Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/matlab/13.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
ckeditor 4.13如何禁用内容转换_Ckeditor - Fatal编程技术网

ckeditor 4.13如何禁用内容转换

ckeditor 4.13如何禁用内容转换,ckeditor,Ckeditor,当我将内容从word粘贴到ckeditor(我的版本是4.13.0)时,如何设置正确的配置是个麻烦 我知道很多跨距都来自word,所以我尝试通过将文本颜色和文本格式改为“字体”来避免这些跨距 //default for font and color are span but change to font because need to escape span when paste from word config.fontSize_style = { element: 'f

当我将内容从word粘贴到ckeditor(我的版本是4.13.0)时,如何设置正确的配置是个麻烦

我知道很多跨距都来自word,所以我尝试通过将文本颜色和文本格式改为“字体”来避免这些跨距

//default for font and color are span but change to font because need to escape span when paste from word
config.fontSize_style = {
    element:        'font',
    styles:         { 'font-size': '#(size)' },
    overrides:      [ { element: 'font', attributes: { 'size': null } } ]
};


config.font_style = {
    element:        'font',
    styles:         { 'font-family': '#(family)' },
    overrides:      [ { element: 'font', attributes: { 'face': null } } ]
};

config.colorButton_foreStyle = {
    element: 'font',
    attributes: { 'color': '#(color)' }
};

config.colorButton_backStyle = {
    element: 'font',
    styles: { 'background-color': '#(color)' }
};
但是我仍然需要特定类的span,比如

config.allowedContent =
                            'h1 h2 h3 h4 strong u strike sub sup blockquote em ul ol li p ;table[*]{*}(*);font[*]{*}(*);s[*]{*}(*); td[*]{*}(*); th[*]{*}(*); tr[*]{*}(*);' +
                            'a[!href,target,class,onclick,id](*);' +
                            'img[!src,alt,width,height];' +
                            'span[!class](update,textnote,andy,footnote);' +
                            'div[*]{margin-left,margin-right,text-align}(*);'

                            ;
但当我复制粘贴一些东西时,我会编辑或转换表单

<span style="background-color:white>

我绝对不想这样-从word粘贴时如何禁用它? 我尝试以不同的方式设置config.pastefilter,但没有任何效果