hectorguo / CKEditor-Markdown-Plugin

Markdown Plugin for CKEditor
http://hectorguo.github.io/CKEditor-Markdown-Plugin/
112 stars 24 forks source link

How to turn on GFM in this plugin? #10

Open pengisgood opened 8 years ago

pengisgood commented 8 years ago

As a developer, I usually write blog in markdown format. Sometimes I need insert a code block in the article and as we know github flavor markdown is very friendly to programmers.

So I just wonder we can enable GFM in this markdown plugin?

hectorguo commented 8 years ago

This markdown plugin is based on marked, and GFM format is its default option, if you want to change other options, you can just add them on this line. Such as

editor.setData(marked(markdownSource, {gfm: true, langPrefix: 'language-'}));

BTW, if you want to highlight your code block and show it in WYSIWYG, you have to add the CodeSnippets plugin in CKEditor. Sorry not to add it in my demo.