简体   繁体   English

CKEditor —如何添加特定于文档的CSS样式

[英]CKEditor — How can I add document-specific CSS styles

I'm using CKEditor to allow editing of template-based HTML newsletters with inline CSS. 我正在使用CKEditor允许使用内联CSS编辑基于模板的HTML新闻。 Each newsletter may have unique CSS styles to be applied to it. 每个新闻通讯可能都有独特的CSS样式要应用。

How can add the document-specific styles to the Styles selection menu in the editor? 如何在编辑器的“样式”选择菜单中添加特定于文档的样式? I know I refer to a CSS file, but such file does not exist, as the styles are in the edited document. 我知道我指的是CSS文件,但是这种样式不存在,因为样式在编辑后的文档中。

If you are wanting to add more options to the styles then you need to edit the following file 如果要向样式添加更多选项,则需要编辑以下文件

ckeditor/plugins/styles/styles/default.js

OR 要么

see the documentation for doing so here http://docs.cksource.com/CKEditor_3.x/Developers_Guide/Styles 请参阅此处的说明文件, 网址http://docs.cksource.com/CKEditor_3.x/Developers_Guide/Styles

OR 要么

see this being discussed on SO here Adding custom styles to CKEditor 看到这里正在讨论中,这是在CKEditor中添加自定义样式

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM