tinymce autoresize with chrome when readonly

Hi guys i tried the full day, but i did not get it.

I use the tinymce editor and in all browsers it works fine, except in ** chrome. I use the autoresize in readonly mode and i always have the problem that in chrome the editor iframe is ~20px to small, so that often text is missing.

I am not the jquery or javascript crack and did not find a solution for it. There is a row where it is setting the style h.setStyle(h.get(a.id + "_ifr"), "height", k + "px"); but when i would add +20 i have the problem that in editor mode it always adds 20 px when keydown. So not a solution.

Add some pixeld by css? But how do i access the iframe element? Maybe someone of you have an idea what i can do here to add there extra pixels.


Ok seems no one has interest to help so i do it with a workaround. In the plugin file i do the following, maybe it helps people, having the same problem:

if (tinymce.isWebKit && tinymce.activeEditor.settings.readonly == true) {

Then you can add some extra pixels, in my case 20px. Maybe there are much better solutions, but it works.



I had a similiar problem with Chrome, tinyMCE 3.5.6 and the autoresize plugin. What helped was manually calling the resize plugin in the init_instance_callback. I'm calling tinyMCE (jQuery version) like this now when the window is loaded:

  theme : 'advanced',
  plugins : 'autoresize',
  width: '100%',
  height: 400,
  autoresize_min_height: 400,
  autoresize_max_height: 800,
  init_instance_callback: function (inst) { inst.execCommand('mceAutoResize'); }


Recent Questions

Top Questions

Home Tags Terms of Service Privacy Policy DMCA Contact Us Javascript

©2020 All rights reserved.