推荐关注
› Meteor
› JSLint - a JavaScript code quality tool
› jsFiddle
› D3.js
› WebStorm
推荐书目
› JavaScript 权威指南第 5 版
› Closure: The Definitive Guide
oglop

tinymce 如何才能高度自动满屏?

  •  
  •   oglop · Apr 20, 2016 · 4139 views
    This topic created in 3863 days ago, the information mentioned may be changed or developed.
    3 replies  •  2016-04-20 09:21:59 +08:00
    oglop
    oglop
    OP
    Apr 20, 2016
    1
    ```
    function doresize(){
    var ht = window.innerHeight;
    console.log("ht = " + ht);

    if (document.getElementsByClassName('mce-toolbar-grp')){
    ht += -document.getElementsByClassName('mce-toolbar-grp')[0].offsetHeight;
    ht += -document.getElementsByClassName('mce-toolbar-grp')[0].offsetTop;
    console.log("ht = " + ht);
    }
    if (document.getElementsByClassName('mce-statusbar')){
    ht += -document.getElementsByClassName('mce-statusbar')[0].offsetHeight;
    console.log("ht = " + ht);
    }

    ht += -3; // magic value that changes depending on your html and body margins

    if (document.getElementsByClassName('mce-edit-area')){
    document.getElementsByClassName('mce-edit-area')[0].style.height = ht + "px";
    console.log("ht = " + ht);
    }

    }

    window.onresize=doresize;
    window.onload=doresize;
    ```

    这样可以但是很挫,能用 css 解决么
    oglop
    oglop
    OP
    Apr 20, 2016
    2
    话说为啥有时候回复用 markdown 格式可以,有时候不行
    test `test`
    loggerhead
    loggerhead
    Apr 20, 2016
    3
    @oglop 回复从来都不支持 markdown ……只有发帖支持,而且只支持部分 markdown 特性
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   4267 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 29ms · UTC 07:24 · PVG 15:24 · LAX 23:24 · JFK 02:24
    ♥ Do have faith in what you're doing.