Replies: 1 comment
-
Since new MarkdownExtension({
htmlToMarkdown: (html: string) => html.replace(/<p><\/p>/g, '<p> </p>'),
}), This makes it so that prior to converting the html from the editor to markdown, you replace all empty paragraphs with ones that have an empty space in them. Now they'll be included in the markdown and blank lines will be preserved :) But then you'll need to use your own HTML to markdown method to pass that HTML string into so you can get markdown back. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm using
<EditorComponent />
inside<Remirror />
and it doesn't add the line breaks. Even if I add 10 line breaks between paragraphs, no matter I have the HardBreakExtension and no matter I press shift + Enter, the line breaks are shown in the editor but not saved to the document.Im using getMarkdown helper for the onChange event and the remirror state context seems to be ok, it has the empty paragraphs but then getMarkdown doesn't return the new lines
Beta Was this translation helpful? Give feedback.
All reactions