• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..03-May-2022-

css/H03-May-2022-21

icons/hidpi/H03-May-2022-

js/H03-May-2022-

theme/H03-May-2022-1,196994

.gitattributesH A D26-Oct-2020483 2320

.gitignoreH A D26-Oct-20202.6 KiB216171

README.mdH A D26-Oct-20202.1 KiB6151

README.md

1# CKEditor-Markdown-Plugin
2Markdown Plugin for CKEditor
3This is a plugin for CKEditor, you can use `markdown` mode in CKEditor. Moreover, your article in `WYSIWYG` mode can be translated to `markdown`.
4
5## Get Started
6It needs [ckeditor standard version](http://download.cksource.com/CKEditor/CKEditor/CKEditor%204.4.7/ckeditor_4.4.7_standard.zip)
7
8You can see the [DEMO](http://hectorguo.github.io/CKEditor-Markdown-Plugin/)
9
10## Usage
111. Create a folder named `markdown` in `ckeditor/plugins` path;
122. Download the source, and uncompress it in the folder;
133. Edit `config.js` (such as `ckeditor/config.js`):
14```javascript
15	config.extraPlugins = 'markdown'; // add this plugin
16```
17Enjoy it!
18
19`config.js` example:
20```javascript
21CKEDITOR.editorConfig = function( config ) {
22	// Define changes to default configuration here.
23	// For complete reference see:
24	// http://docs.ckeditor.com/#!/api/CKEDITOR.config
25
26	// The toolbar groups arrangement, optimized for two toolbar rows.
27	config.toolbarGroups = [
28		// { name: 'clipboard',   groups: [ 'clipboard', 'undo' ] },
29		// { name: 'editing',     groups: [ 'find', 'selection', 'spellchecker' ] },
30		// { name: 'links' },
31		// { name: 'insert' },
32		// { name: 'forms' },
33		{ name: 'tools' },
34		// { name: 'document',	   groups: [ 'mode', 'document', 'doctools' ] },
35
36		// '/',
37		{ name: 'basicstyles', groups: [ 'basicstyles', 'cleanup' ] },
38		// { name: 'paragraph',   groups: [ 'list', 'indent', 'blocks', 'align', 'bidi' ] },
39		{ name: 'styles' },
40		{ name: 'others' }
41		// { name: 'colors' },
42		// { name: 'about' }
43	];
44
45	// Remove some buttons provided by the standard plugins, which are
46	// not needed in the Standard(s) toolbar.
47	config.removeButtons = 'Underline,Subscript,Superscript';
48	config.extraPlugins = 'markdown';  // this is the point!
49	// Set the most common block elements.
50	config.format_tags = 'p;h1;h2;h3;pre';
51
52	// Simplify the dialog windows.
53	config.removeDialogTabs = 'image:advanced;link:advanced';
54};
55```
56
57## Thanks
58- [marked](https://github.com/chjj/marked)
59- [to-markdown](http://domchristie.github.io/to-markdown)
60- [codemirror](https://github.com/codemirror/CodeMirror)
61