javascript - CKEditor, mathematics and content filter -


i have configured ckeditor remove margin, color , font styles.

here's ckeditor config :

ckeditor.editorconfig = function( config ) {     // add wiris plugin list     config.extraplugins += (config.extraplugins.length == 0 ? '' : ',') + 'ckeditor_wiris';     // allow elements     config.allowedcontent = {         $1: {             // use ability specify elements object.             elements: ckeditor.dtd,             attributes: true,             styles: true,             classes: true         }     };     // disallow font, margin, color styles , span elements     config.disallowedcontent = '*{font*}; *{margin*}; *{color*}; span;'; }; 

i'm using wiris plugin create math equations. when create math equation plugin, can see equation in ckeditor , when save it, it's saved intended. when want edit, equation no longer math equation simple text. think config removing math elements keeping text. don't know what's wrong config since allowed html elements disallowing element don't want. idea ?

found hacky way adding config.js :

    config.extraallowedcontent = 'math[xmlns]; maction; maligngroup; malignmark; menclose; merror; mfenced; mfrac; mglyph; mi;' +     'mlabeledtr; mlogdiv; mmultiscripts; mn; mo; mover; mpadded; mphantom; mroot; mrow; ms; mscarries; mscarry;' +     'msgroup; mstack; msline; mspace; msqrt; msrow; mstack; mstyle; msub; msup; msubsup; mtable; mtd; mtext; mtr;' +     'munder; munderover; semantics; annotation; annotation-xml;'; 

Comments

Popular posts from this blog

angular - Ionic slides - dynamically add slides before and after -

minify - Minimizing css files -

Add a dynamic header in angular 2 http provider -