为什么不加载ckeditor contentcss
正在处理服务器日志报告:为什么不加载ckeditor contentcss,ckeditor,Ckeditor,正在处理服务器日志报告: [20/Mar/2016 22:52:22] "GET /tm/edit_blocks HTTP/1.1" 200 1932 现在这一行没有出现 <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>CKEditor</title> <script src="//cdn.
[20/Mar/2016 22:52:22] "GET /tm/edit_blocks HTTP/1.1" 200 1932
现在这一行没有出现
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>CKEditor</title>
<script src="//cdn.ckeditor.com/4.5.7/standard-all/ckeditor.js"></script>
</head>
<body>
<textarea id="editor0" name="editor0"><p>Editor</p>{{ block0.html }}</textarea>
<script>
CKEDITOR.replace('editor0'), {contentsCss : '/static/tm/style2.css'};
</script>
</body>
</html>
编辑
编辑器{{block0.html}
CKEDITOR.replace('editor0'),{contentsCss:'/static/tm/style2.css'};
您需要加载一个额外的插件
CKEDITOR.replace('editor0'), {extraPlugins : 'stylesheetparser',contentsCss : '/static/tm/style2.css'};
编辑
应更新原始代码:
CKEDITOR.replace( 'editor0',{contentsCss :'/static/tm/style3.css'});
你需要加载一个额外的插件
CKEDITOR.replace('editor0'), {extraPlugins : 'stylesheetparser',contentsCss : '/static/tm/style2.css'};
编辑
应更新原始代码:
CKEDITOR.replace( 'editor0',{contentsCss :'/static/tm/style3.css'});
我没有使用样式表解析器。我正在设置编辑器的config.contentsCss。根据文档,有两种设置配置选项的方法:
CKEDITOR.replace('editor0'),{contentsCss:'/static/tm/style3.css'};CKEDITOR.config.contentsCss='/static/tm/style3.css'
我开始使用第一个,它起作用了,现在两个都不起作用了,没有解析器我总是遇到contentsCss不起作用的问题。你能试试这个吗?替换('editor0',{contentsCss:'/static/tm/style3.css'});非常感谢。我有一个盲点-“,”在错误的地方。现在可以了。如果这解决了问题,我更新了我的答案,你可以接受为答案:)我没有使用stylesheetparser。我正在设置编辑器的config.contentsCss。根据文档,有两种设置配置选项的方法:CKEDITOR.replace('editor0'),{contentsCss:'/static/tm/style3.css'};CKEDITOR.config.contentsCss='/static/tm/style3.css'
我开始使用第一个,它起作用了,现在两个都不起作用了,没有解析器我总是遇到contentsCss不起作用的问题。你能试试这个吗?替换('editor0',{contentsCss:'/static/tm/style3.css'});非常感谢。我有一个盲点-“,”在错误的地方。现在它工作了。如果这解决了问题,我更新了我的答案,你可以接受作为答案:)