Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

tinyMCE: set padding of editor

Tags:

tinymce

How do I set the padding inside the tinyMCE editor?

I've seen answers like so:

body{ padding:0px }

But it shouldn't be on the body??

like image 684
user984003 Avatar asked Dec 16 '22 14:12

user984003


2 Answers

Have look at the tinymce config param content_css. Using this param you may set your own css stuff and overwrite tinymcedefault css. You may apply the padding to whatever element you want (under body)

like image 179
Thariama Avatar answered Dec 18 '22 03:12

Thariama


you could also try these 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 info

like image 30
Joe Black Avatar answered Dec 18 '22 04:12

Joe Black