CKEditor:如何更改主要内容区域的填充?
有什么方法可以更改主要内容区域的填充(基于每个实例)?我正在研究皮肤 css 文件,但仍然没有任何线索。
提前致谢!
已编辑
我找到了content.css
,但如果我没记错的话,它适用于所有实例。
Is there any way to change the main content area's padding (per instance basis)? I am looking into the skins css files and still haven't got any clues.
Thanks in advance!
Edited
I found content.css
but if I'm not wrong, it applies to all instances.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
在 content.css 中,我将正文 CSS 更改为包含:
这最初不起作用,即使在重新发布(Visual Studio 2010)并检查文件后也是如此。但后来发现一些 CSS 更改并不总是有效 - 所以在清除浏览器 (Chrome 36.0) 缓存后 - 它有效:)
In content.css I changed body CSS to include:
This didn't work initially, even after re-publishing (Visual Studio 2010) and checking the file. But then figures that some CSS changes haven't always worked - so after clearing Browser (Chrome 36.0) Cache - It worked :)
我有一个解决方案,有点麻烦,但应该可以工作:
Duplicate file ../ckeditor/contents.css as ../ckeditor/contents_xxx.css
将以下代码添加到contents_xxx.css,20px仅作为示例:
body {padding: 20px;}
编辑../ckeditor/ckeditor.js
a.搜索并替换:'contents.css' -> css文件
b.将以下代码添加到 ckeditor.js 顶部:
var cssFile = 'contents.css';
if(document.URL.indexOf("THE_URL_WHICH_YOU_WOULD_LIKE_TO_ADD_PADDING") > -1){
cssFile = 'contents_XXX.css';
}
请更新“THE_URL_WHICH_YOU_WOULD_LIKE_TO_ADD_PADDING”。
I have a solution, a little bit trouble but it should work:
Duplicate file ../ckeditor/contents.css as ../ckeditor/contents_xxx.css
Add following code to contents_xxx.css, 20px just for example:
body {padding: 20px;}
Edit ../ckeditor/ckeditor.js
a. Search and replace: 'contents.css' -> cssFile
b. Add following code to the top of ckeditor.js:
var cssFile = 'contents.css';
if(document.URL.indexOf("THE_URL_WHICH_YOU_WOULD_LIKE_TO_ADD_PADDING") > -1){
cssFile = 'contents_XXX.css';
}
*Please update "THE_URL_WHICH_YOU_WOULD_LIKE_TO_ADD_PADDING".