我下载了ckeditor,解压,安装和所有这些东西。它工作得很好,但我不能更改/plugins/template/template/default.js中的模板。我甚至删除了它们,不工作。
这就是我更改模板的方式吗?(我在这里很绝望)
PLease救命!
发布于 2014-06-18 17:59:03
尝试检查文档的http://docs.ckeditor.com/#!/api/CKEDITOR.config-cfg-templates_files
config.templates = 'my_templates';
config.templates_files = [
'/editor_templates/site_default.js',
'http://www.example.com/user_templates.js
];发布于 2017-11-17 19:55:03
清除浏览器缓存肯定有效。
转到/vendors/ckeditor/plugins/templates/templates/default.js
确保在两个逗号之间放置每个HTML标记和任何文本,并在结束逗号的末尾加上一个加号。
仅供参考-加号出现在的最后一个HTML标签之后。
=========================
示例:
https://github.com/ckeditor/ckeditor-dev/blob/master/plugins/templates/templates/default.js
发布于 2017-11-19 00:18:40
如何在CKEditor中创建自己的自定义超文本标记语言模板。
我成功地创建了自己的自定义样式模板,在CKEditor中有自己的图形化区域。
=========================
在CKEditor文件夹中,打开位于...的默认JS文件。
/ckeditor/plugins/templates/templates/default.js
=========================
确保将每个HTML标记和每行文本放在两(2)个逗号之间,并在每个结束逗号的末尾加上一个加号。
仅供参考-加号不应出现在最后一个HTML标记之后。
=========================
代码示例:
'<span style="font-size:18px">'+
'<strong>'+
'<span style="color:#003366">'+
'<span style="font-family:Arial,Helvetica,sans-serif">'+
'Here is some sample text'+
'</span>'+
'</span>'+
'</strong>'+
'</span>'========================
在线示例:
https://github.com/ckeditor/ckeditor-dev/blob/master/plugins/templates/templates/default.js
=========================
如果在CKEditor的前端所见即所得中没有看到任何更改,请尝试清除浏览器的缓存。
https://stackoverflow.com/questions/24277435
复制相似问题