如何不用强制设置字体,就能够按照宋体格式(两空格空一个汉字的位置)去显示文本,并且当强制设置了字体后,又能够按照字体本身的格式去显示。------------------------------------ 很简单... 修改 ckeditor/contents.css 里的 /* Copyright (c) 2003-2010, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.html or http://ckeditor.com/license */body { /* Font */ font-family: Arial, Verdana, sans-serif;==>宋体; font-size: 12px; /* Text color */ color: #222; /* Remove the background color to make it transparent */ background-color: #fff; }
很简单...
修改 ckeditor/contents.css 里的
/*
Copyright (c) 2003-2010, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
*/body
{
/* Font */
font-family: Arial, Verdana, sans-serif;==>宋体;
font-size: 12px; /* Text color */
color: #222; /* Remove the background color to make it transparent */
background-color: #fff;
}
感谢这位朋友的回答,此处我也修改过,还是不起作用,我看网上也有人提到改这里,但是我改完确实无效,难道和CKEditor的版本有关?
估计楼主整站里还有其他的CSS文件中有
body
{
...
}
影响
我测试的时候发现我这里有3个CSS里body呢
这可能会影响编辑器里的字体样式楼主可用Firefox的fireBug看下具体还有那些body
{
element : 'span',
styles : { 'font-family' : '宋体' },
overrides : [ { element : 'font', attributes : { 'face' : null } } ]
};再不行那就没办法鸟,英文版的,对中文支持有点那个。
用FB看中文属性,都是黑框框问号...
只有在编辑里面编辑的时候自己添加样式如
<div style="font-family:'微软雅黑'">内容</div>
这样前台才显示跟后台是一样的。