froala / wysiwyg-editor

The next generation Javascript WYSIWYG HTML Editor.
https://www.froala.com/wysiwyg-editor
Other
5.3k stars 676 forks source link

Markdown API to get HTML converted from markdown #4361

Open petrinecp opened 3 years ago

petrinecp commented 3 years ago
Expected behavior.

When using Markdown mode, I should be able to get the generated HTML from the entered markdown through API. I whould expect such a function to be exported as public API in editor.markdown.getHtml().

Actual behavior.

The API which converts the editor markdown content to HTML, is not public. The markdown plugin registers an event listener for the contentChanged event and calls a private function which converts the input to HTML

image

Steps to reproduce the problem.

See my jsfiddle https://jsfiddle.net/970utj8f/. I would like to be able to get the generated HTML so it can be saved and eventually rendered from the backend. I could access the .fr-markdown-view element and get its innerHTML but I don't think this is the way it was intended to be used.

Editor version.

4.0.6

OS.

Windows 10

Browser.

Chrome

MeghashreeAP commented 2 years ago

Thank you for your feedback. The request has been reported to the product management team for evaluation and consideration for an upcoming release.