Laz  Karimov
Laz Karimov

Reputation: 714

tinymce iframe height

I am using tinyMCE, and have more than 100 texareas on the page. Iframe, which is created after initialization, has min-width=62px, even there is only a line inside. Can I somehow decrease this value?

And the second question, inside Iframe there is HTML page with body style="padding-bottom:50px". Is it possible to decrease it, otherwise textarea takes much place :/

enter image description here

Thanks in advance.

Upvotes: 2

Views: 2796

Answers (2)

user1875173
user1875173

Reputation: 56

tinyMCE.init({
   ...
   autoresize_bottom_margin : 10,       
   theme : 'advanced',
   plugins : 'autoresize',
   ...
});

Upvotes: 4

Thariama
Thariama

Reputation: 50840

Yes, this is possible. Here it is:

tinyMCE.init({
   ...
   setup : function(ed) {
      ed.onInit.add(function(ed, evt) {

          var new_val = '30px';

          // adjust table element
          var elem = document.getElementById(ed.id + '_tbl');
          elem.style.height = new_val;

          // adjust iframe element
          var iframe = document.getElementById(ed.id + '_ifr');
          iframe.style.height = new_val;
      });
   }
});

Upvotes: 2

Related Questions