Change tinyMce editor's height dynamically

后端 未结 8 756
庸人自扰
庸人自扰 2020-12-16 01:05

I am using tinymce editor in my page. What I want to do is to change the height of the editor dynamically. I have created a function:

function setComposeTex         


        
8条回答
  •  感动是毒
    2020-12-16 02:01

    You can resize tinymce with the resizeTo theme method:

       editorinstance.theme.resizeTo (width, height);
    

    The width and height set the new size of the editing area - I have not found a way to deduce the extra size of the editor instance, so you might want to do something like this:

       editorinstance.theme.resizeTo (new_width - 2, new_height - 32);
    

提交回复
热议问题