Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature Request: Convert ADF to Markdown 😢 #7

Open
jamie-wearsafe opened this issue Apr 27, 2020 · 4 comments
Open

Feature Request: Convert ADF to Markdown 😢 #7

jamie-wearsafe opened this issue Apr 27, 2020 · 4 comments

Comments

@jamie-wearsafe
Copy link

I'm writing a GitHub action currently that takes Jira Issues, and Jira sprints and creates GitHub Issues, and Github Milestones.

@bruno-morel
Copy link
Contributor

bruno-morel commented Apr 28, 2020

Ah. the opposite then? :)
The parser inside this is probably invert-able...
How far this need to go? Is it just batch, or does it need to do 2 way sync/diffing?

@xmedeko
Copy link

xmedeko commented Oct 8, 2021

Get the ADF to HTML by API param expand=renderedFields, then you can use e.g. https://github.com/mixmark-io/turndown to convert HTML to Markdown.

Also see https://jira.atlassian.com/browse/JRACLOUD-77436 and the library https://bitbucket.org/atlassian/atlaskit-mk-2/src/master/packages/editor/editor-markdown-transformer/

@julianlam
Copy link

julianlam commented Mar 2, 2022

It's also prudent to mention that it is not possible to translate ADF to Markdown in a complete way as the formats are not 1:1 compatible. ADF contains a superset of Markdown's features, and so you wouldn't be able to translate a lot of types (e.g. mention, media, panel, etc.) to markdown equivalents, as they don't exist.

It's still worth doing, so long as the source ADF just contains basic formatting, so I might end up creating a library for it.

@julianlam
Copy link

I made a library for it 😄 https://github.com/julianlam/adf-to-md

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants