cssjshtml ckedior支持markdown一坑

葫芦的运维日志

下一篇 搜索 上一篇

浏览量 4779

2019/05/10 18:26


下载地址

https://ckeditor.com/cke4/addon/markdown

安装

  1. Create a folder named markdown in ckeditor/plugins path;
  2. Download the source, and uncompress it in the folder;
  3. Edit config.js (such as ckeditor/config.js):
    config.extraPlugins = 'markdown'; // add this plugin
    

进坑

安装完报错: Uncaught DOMException: 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.

脱坑方法

vim ckeditor/plugins/markdown/plugin.js 将错误的哪一行修改成如下

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

葫芦的运维日志

打赏

上一篇 搜索 下一篇
© 冰糖葫芦甜(bthlt.com) 2021 王梓打赏联系方式 陕ICP备17005322号-1