Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Having trouble getting TinyMCE to have an auto-sized width

I'm trying to incorporate TinyMCE into my CMS and I'm having the hardest time getting the width to resize to the size of my container. I'm using the advanced toolbar theme and the buttons do not drop below to form another row if the width is made smaller. I've searched a lot of forums and the TinyMCE docs and I can't find a solution that works for me.

So far I've tried:

  • Setting the width in the tinyMCE.init function
  • Setting auto_resize to true
  • Changing the editor container width with CSS
  • Changing the toolbars so they float
  • Using the custom autoresize function in the wiki

It seems like a lot of people have had issues with this, and the forum moderator at TinyMCE isn't particularly helpful or polite. Can anyone suggest a solution?

like image 938
VirtuosiMedia Avatar asked Mar 01 '09 00:03

VirtuosiMedia


1 Answers

Here's a CSS rule for your TinyMCE theme/style file that works for me:

.sclSkin table.mceToolbar, .sclSkin tr.mceFirst .mceToolbar tr td, .sclSkin tr.mceLast .mceToolbar tr td { float: left; }

Make sure to replace the .sclSkin above with the name/identifier of your theme/skin;

like image 162
jason Avatar answered Oct 03 '22 14:10

jason