Feature Request: Allow returning undefined/false from parseMarkdown #7571
n-siddarth
started this conversation in
Feature Requests
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Description
It would be nice if users had the option of returning
undefinedorfalsefromparseMarkdownimplementations indicating that the parsing was not successful and that the tokens should be skipped for this handler. This would allow multiple extensions to serialize to the same markdown string but parse differently based on certain conditions.Use Case
For example, let's say files and websites are treated differently in the editor. Both should serialize to standard markdown links. For example, files can be serialized to
[filename](/path/to/file)while normal links can be represented as standard[display](http://example-url.com). However, when it comes to parsing, the two extensions should be able to conditionally parse the tokens depending on the structure of thehreftoken passed to theparseMarkdownfunction.Type
New Tiptap API
Beta Was this translation helpful? Give feedback.
All reactions