-
Hey all; I'm working on a problem and was hoping for a little advice or maybe validation. We're using plate to build an editor that is ultimately turned into Markdown. Because of this we've built a plugin that removes invalid Elements from tables (such as codeblocks); that works well enough. The next problem we're trying to address is removing I have managed to successfully strip out paragraphs and put their content directly into the table cell, but this causes other problems. If a user selects some text and chooses codeblock (for example) the codeblock replaces the td/th, which breaks the structure of the DOM. Sooo... yeah whats the best way to address this? Do I replace Thanks in advance! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
We worked round this by creating a new type of element (TABLE_PARAGRAPH) which is basically rendered as a tag within slate, but when serialized to HTM, removed. This ultimately allows us to preserve our markdown structure. |
Beta Was this translation helpful? Give feedback.
We worked round this by creating a new type of element (TABLE_PARAGRAPH) which is basically rendered as a
tag within slate, but when serialized to HTM, removed. This ultimately allows us to preserve our markdown structure.