TinyMCE: setting editor indents

How to customize padding inside tinyMCE editor?

I've seen answers like this:

body{ padding:0px }

      

But it shouldn't be on the body?

+3


source to share


3 answers


Take a look at the tinymce content_css config parameter . Using this setting you can set your own css stuff and overwrite tinymcedefault css. You can apply padding to any element you want (under the body)



+6


source


If you need a quick solution, try the CSS definition:

div.mce-edit-area{
    background:#FFF;
    filter:none;
>>> padding:10px; <<< 
}

      



in the files skin.min.css and skin.ie7.min.css .

+2


source


you can also try the following methods:

tinymce.init({
  selector: 'textarea',  // change this value according to your HTML

  // set whatever class name you have that adds the padding
  body_class: 'my_class', 

  // or attach your own css file (resolved to http://domain/myLayout.css)
  content_css : '/myLayout.css',

  // or finally, add your padding directly
  content_style: "body {padding: 10px}"
});

      

see the docs for more information

0


source







All Articles