Is it possible to return actual markdown in a text field, rather than the structured dast?
I’m pulling the structured text into flutter, and was thinking to use the flutter markdown plugin. Which requires straight up markdown not unist/dast.
Is it possible to return actual markdown in a text field, rather than the structured dast?
I’m pulling the structured text into flutter, and was thinking to use the flutter markdown plugin. Which requires straight up markdown not unist/dast.
Hello @emile.swain
I’m assuming you are using a structured text field, not a rich-text field with presentation set to markdown.
In that case, you can parse the request response into markdown with some auxiliary tools:
Although we do have some custom tools like the structured-text-to-plain-text:
If you want to convert the dast to Markdown, the best option for your use-case would probably be
That is designed to take an mdast tree and output markdown.
Yeah, unfortunately i’m in Flutter. Can’t find a dart equivelent.
Unfortunately i couldn’t find one as well
The 2 ways around this would be to either parse it manually or somewhere else (which would be very complex to say the least)
Or to use the rich-text field instead of the structured text, but you would have to give up on the blocks inside the field, which is also a pretty big problem
Sadly there seems to be a lack of tools that support mdast in dart.
Thanks. I’ll try that. I’m going to simplify things our end and just a block with title, body for now.