EasyMDE: A simple, beautiful, and embeddable JavaScript Markdown editor. Delightful editing for beginners and experts alike. Features built-in autosaving and spell checking.
This is a very simple PR to allow more flexibility when rendering the preview. At the moment the innerHTML of the preview node will be overwritten with the result from previewRender with every showing of the preview. If you want to control this node via external means, for example with vdom diffing frameworks like Mithril.js or React, this gets in your way. With this change, the innerHtml of the preview node will only be overwritten if the result of previewRender is not null. I updated the type definitions and documentation accordingly.
This is a very simple PR to allow more flexibility when rendering the preview. At the moment the
innerHTML
of the preview node will be overwritten with the result frompreviewRender
with every showing of the preview. If you want to control this node via external means, for example with vdom diffing frameworks like Mithril.js or React, this gets in your way. With this change, theinnerHtml
of the preview node will only be overwritten if the result ofpreviewRender
is not null. I updated the type definitions and documentation accordingly.