I’ve built a minimal markdown editor using Lexical, Lexical-Solid, and the provided plugins and examples. I’d like to, in some cases, preserve the markdown syntax, but it looks like the existing markdown transformers are built to actually replace each regex match with the desired node. Is there a way to retain some of the syntax? For example:
With an input of # Heading
:
Heading
^ current output
# Heading
^ desired output
I wouldn’t want to do this for everything, but likely a few elements.
I tried following the lexical code down a bit but I can’t find any existing customizability. I’m assuming I will have to rewrite most of the functions to implement the new node and whatnot, although it would be nice to simply tweak the transformer implementation for the desired behavior
Shaun Fattig is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.