CKEditor将CSS样式添加到预览和编辑器 [英] CKEditor add CSS styling to Preview and Editor

查看:3425
本文介绍了CKEditor将CSS样式添加到预览和编辑器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否可以添加CSS样式的编辑器文本以及预览?

Is it possible to add CSS to style the Editor text as well as the Preview?

CMS有一组不同的CSS文件从公共部分

The CMS has a different set of CSS files from the public part of the website and I want the editor to try (at least) and reflect the way it would look in the site.

例如,所有具有.floatLeft类的标签都会显示。 float:left; margin:0 10px 10px 0;}我想在编辑器中看起来一样。

For example, all tags with a class of .floatLeft{float:left;margin:0 10px 10px 0;} I want to look the same in the Editor.

谢谢。

推荐答案

设置 CKEDITOR.config.contentsCss 变量。
CKEDITOR.config.bodyClass 和< a href =http://docs.cksource.com/ckeditor_api/symbols/CKEDITOR.config.html#.bodyId =nofollow noreferrer> CKEDITOR.config.bodyId 也可以帮助。
这些只是你有(我认为)的选项。

Setup CKEDITOR.config.contentsCss variable. CKEDITOR.config.bodyClass and CKEDITOR.config.bodyId could help too. These are only options you have (i think).

这篇关于CKEditor将CSS样式添加到预览和编辑器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆