CKEditor: How to change the main content area's padding?
Is there any way to change the main content area's p开发者_高级运维adding (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.
In content.css I changed body CSS to include:
margin: 0 0 0 0;
padding: 0 0 0 0;
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 :)
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".
精彩评论