Thurein
Thurein

Reputation: 2566

CKEditor: How to change the main content area's padding?

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.

Upvotes: 1

Views: 5561

Answers (2)

Daf
Daf

Reputation: 61

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 :)

Upvotes: 1

ahgood
ahgood

Reputation: 1937

I have a solution, a little bit trouble but it should work:

  1. Duplicate file ../ckeditor/contents.css as ../ckeditor/contents_xxx.css

  2. Add following code to contents_xxx.css, 20px just for example:

    body {padding: 20px;}

  3. 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".

Upvotes: 0

Related Questions