How to implement markdown editor using TinyMCE?

I want to add a markdown editor so that users can post their answers on my page. I found TinyMCE, but there is a problem with this: I do not know how to implement the tag editor with TinyMCE.

Does anyone have any experience with this? Please show me how to set up the tag editor.

+5
source share
1 answer

It looks like the Plugin Text Template can do this:

This plugin conforms to special patterns in the text and applies formats or executable commands on these patterns.

...

tinymce.init({ selector: "textarea", // change this value according to your HTML plugin: 'textpattern', textpattern_patterns: [ {start: '*', end: '*', format: 'italic'}, {start: '**', end: '**', format: 'bold'}, {start: '#', format: 'h1'}, {start: '##', format: 'h2'}, {start: '###', format: 'h3'}, {start: '####', format: 'h4'}, {start: '#####', format: 'h5'}, {start: '######', format: 'h6'}, {start: '1. ', cmd: 'InsertOrderedList'}, {start: '* ', cmd: 'InsertUnorderedList'}, {start: '- ', cmd: 'InsertUnorderedList'} ] }); 
+7
source

All Articles