How to automatic resize tinyMCE?

后端 未结 12 1463
小蘑菇
小蘑菇 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:48

    SyCoDeR is right but I followed a slightly different path though probably with the same results.

    /*Container, container body, iframe*/
    .mce-tinymce, .mce-container-body, #code_ifr {
        min-height: 100% !important;
    }
    /*Container body*/
    .mce-container-body {
        position: absolute;
        bottom: 0;
        left: 0;
        right: 0;
    }
    /*Editing area*/
    .mce-container-body .mce-edit-area {
        position: absolute;
        top: 69px;
        bottom: 37px;
        left: 0;
        right: 0;
    }
    /*Footer*/
    .mce-tinymce .mce-statusbar {
        position: absolute;
        bottom: 0;
        left: 0;
        right: 0;
    }
    

    Revised because TinyMCE changes the id's with menu/toolbar additions or deletions. This works no matter what you do with it.

提交回复
热议问题