How can I get plain text from a WMD editor?

I can get the text text of Markdown and HTML from the WMD editor . In my requirement, I also need to get plain text from the WMD editor . I would like to explain this with a simple example.

In Qaru, we will see the Markdown text when entering a description in the WMD editor. In the preview, we can see the formatted text <b>. On the question page without this Markdown and formatted text, we can see a description of the question in two lines.

I need to achieve the same functionality. What do I need to do?

+5
source share
1 answer

WMD (, , wmd-new, WMD ) jQuery, :

$('#wmd-preview').text()

div . , Stack Overflow.

0

All Articles