CKEditor将CSS样式添加到预览和编辑器

CKEditor将CSS样式添加到预览和编辑器

本文介绍了CKEditor将CSS样式添加到预览和编辑器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述 29岁程序员,3月因学历无情被辞! 是否可以添加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 和 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样式添加到预览和编辑器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 上岸,阿里云!
08-30 22:30