How to automatic resize tinyMCE?

后端 未结 12 1473
小蘑菇
小蘑菇 2020-12-01 09:03

I have a TinyMCE that is set over a TextArea, and I want this editor area to ocuppy all the space of its parent div, all times.

I have a JS function that get the cur

12条回答
  •  旧巷少年郎
    2020-12-01 09:39

    The wrapper of iframe (its ID finish by _ifr) is the first parent of span that it has application as role . Thus, To get the wrapper :

    $('span[role=application]').parents(':eq(0)')
    

    So to Resize height:

    $('[id$=_ifr]').css('height',$('span[role=application]').parents(':eq(0)').css('height'))
    

    To resize width

    $('[id$=_ifr]').css('width',$('span[role=application]').parents(':eq(0)').css('width'))
    

提交回复
热议问题