hectorguo / CKEditor-Markdown-Plugin

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

Uncaught InvalidCharacterError #2

Closed Kikketer closed 8 years ago

Kikketer commented 9 years ago

Just having this one included in the standard CKEditor configuration and running their "samples" area. When I switch to Markdown mode I get the following error:

Uncaught InvalidCharacterError: Failed to execute 'add' on 'DOMTokenList': The token provided ('cke_source cke_reset cke_enable_context_menu') contains HTML space characters, which are not valid in tokens.

Modifying line 49 (plugin.js) fixes the issue:

textarea.addClass('cke_source cke_reset cke_enable_context_menu'.split(' '));
hectorguo commented 8 years ago

just fixed it.

You can update the plugin.js.

or just change line 49 to this:

textarea.addClass('cke_source').addClass('cke_reset').addClass('cke_enable_context_menu');

The previous code is referred to official samples of CKEditor plugins, but I am not sure if it has changed the method in new versions.

Thanks for your feedback.