You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am trying to convert basic MarkDown to a formatted Quill document, but the approach that I believe is right only parses the in-line markdown (like bold and italics) and not markdown like headers and block markdown like an ordered list. What am I doing wrong?
Code snippet:
final markdownDocument = md.Document(inlineSyntaxes: [ // not sure I need to specify these, but I did
md.EmphasisSyntax.asterisk(),
md.EmphasisSyntax.underscore()
], blockSyntaxes:const [ // similarly, not sure I need to specify these as they are pretty standard
md.HeaderSyntax(),
md.UnorderedListSyntax(),
md.OrderedListSyntax()
]);
final quillDocDelta =MarkdownToDelta(markdownDocument: markdownDocument)
.convert(markDownString); // markDownString is a typical markdown formatted document
result =jsonEncode(quillDocDelta.toJson());
The result can be used to create a Quill document, but as described above, only some of the formatting makes it into the document.
The text was updated successfully, but these errors were encountered:
Is there an existing issue for this?
The question
I am trying to convert basic MarkDown to a formatted Quill document, but the approach that I believe is right only parses the in-line markdown (like bold and italics) and not markdown like headers and block markdown like an ordered list. What am I doing wrong?
Code snippet:
The
result
can be used to create a Quill document, but as described above, only some of the formatting makes it into the document.The text was updated successfully, but these errors were encountered: