How can I resize a TinyMCE popup when a select input changes? -



How can I resize a TinyMCE popup when a select input changes? -

i have tinymce popup shows/hides elements when select input changes. there way can resize popup reflect new height of body instead of forcing user resize popup themselves?

tinymcepopup.resizetoinnersize(); resizes popup original size, not new size (it cuts off elements shown).

i solved adding command while creating plugin:

ed.addcommand( 'pluginname_resize', function( ui, v ) { ed.windowmanager.params.mce_height = v.height + 10; } );

made body element have id body-id (<body id="body-id">...</body>)

and when select input changes:

var window = tinymcepopup.dom.getsize( 'body-id' ); tinymcepopup.execcommand( 'pluginname_resize', false, { height : window.h } ); tinymcepopup.resizetoinnersize();

resize popup tinymce

Comments

Popular posts from this blog

web services - java.lang.NoClassDefFoundError: Could not initialize class net.sf.cglib.proxy.Enhancer -

Accessing MATLAB's unicode strings from C -

javascript - mongodb won't find my schema method in nested container -