Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/javascript/399.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
Javascript Ckeditor断页css网页_Javascript_Html_Ckeditor_Wysiwyg - Fatal编程技术网

Javascript Ckeditor断页css网页

Javascript Ckeditor断页css网页,javascript,html,ckeditor,wysiwyg,Javascript,Html,Ckeditor,Wysiwyg,我使用的是ckeditor,我从数据库中读取一个模板,其中包含html代码css和js 问题是在使用时: CKEDITOR.replace ('description'); 模板的css代码与网页的代码合并,然后网页采用我从模板中读取的样式并打破样式 我应该做的是,编辑只接受css,而不是网页 我的配置是: CKEDITOR.editorConfig = function( config ) { config.toolbarGroups = [ { name: 'cli

我使用的是ckeditor,我从数据库中读取一个模板,其中包含html代码css和js

问题是在使用时:

CKEDITOR.replace ('description');
模板的css代码与网页的代码合并,然后网页采用我从模板中读取的样式并打破样式

我应该做的是,编辑只接受css,而不是网页

我的配置是:

CKEDITOR.editorConfig = function( config ) {
    config.toolbarGroups = [
        { name: 'clipboard',   groups: [ 'clipboard', 'undo' ] },
        { name: 'editing',     groups: [ 'find', 'selection', 'spellchecker' ] },
        { name: 'links' },
        { name: 'insert' },
        { name: 'forms' },
        { name: 'tools' },
        { name: 'document',    groups: [ 'mode', 'document', 'doctools' ] },
        { name: 'others' },
        { name: 'basicstyles', groups: [ 'basicstyles', 'cleanup' ] },
        { name: 'paragraph',   groups: [ 'list', 'indent', 'blocks', 'align', 'bidi' ] },
        { name: 'styles' },
        { name: 'colors' },
        { name: 'about' }
    ];
    config.removeButtons = 'Underline,Subscript,Superscript';
    config.format_tags = 'p;h1;h2;h3;pre';
    config.removeDialogTabs = 'image:advanced;link:advanced';
};
有人能帮我吗


谢谢

请编辑您的问题并显示CKeditor配置。@SaidbakR准备好了,如果可以,请查看此gif:[链接],thanksQuick黑客可能会使用
!重要信息
因此,您的问题是:编辑器中呈现文本的自定义样式可能会覆盖页面的样式@DiegoguerRowhever,结帐可能会对你有所帮助。