如图,ckeditor添加表情插件(插件来自http://编辑器官网.com/addon/smiley)后,内容插入表情,无法提交发表内容。无论点击“确认发起”还是“回复”,均无任何反应。请问如何修改使之正常提交编辑器内容。
急盼回复,不胜感激。
补充:
调试发现错误提示:“Uncaught TypeError: Cannot read property 'replace' of undefined”;
问题出现在static/js/ediotor/ckeditor/ckeditor.js第685行:
“c.entities_additional&&e.push(c.entities_additional));var a=i(e.join(",")),d=a.regex?"["+a.regex+"]":"a^";delete a.regex;c.entities&&c.entities_processNumerical&&(d="[^ -~]|"+d);var d=RegExp(d,"g"),h=i("nbsp,gt,lt,amp,shy",!0),j=RegExp(h.regex,"g");b.addRules({text:function(a){return a.replace(j,f).replace(d,g)}},{applyToAll:!0,excludeNestedEditable:!0})}}})})();CKEDITOR.config.basicEntities=!0;CKEDITOR.config.entities=!0;CKEDITOR.config.entities_latin=!0;CKEDITOR.config.entities_greek=!0;”
然后下载了ckeditor4.4.6的full版,发现对应的原始代码在第711行:
“b.entities_additional&&d.push(b.entities_additional));var e=j(d.join(",")),f=e.regex?"["+e.regex+"]":"a^";delete e.regex;b.entities&&b.entities_processNumerical&&(f="[^ -~]|"+f);var f=RegExp(f,"g"),c=function(a){return b.entities_processNumerical=="force"||!e[a]?"&#"+a.charCodeAt(0)+";":e[a]},g=j("nbsp,gt,lt,amp,shy",!0),i=RegExp(g.regex,"g"),k=function(a){return g[a]};a.addRules({text:function(a){return a.replace(i,k).replace(f,c)}},{applyToAll:!0,excludeNestedEditable:!0})}}})})();”
看的头大,请问该如何修改?
阅读全文
收起全文