简体   繁体   English

如何设置 TinyMCE 的最小调整宽度/高度?

[英]How to set the minimum resize width/height for TinyMCE?

I have a TimyMCE editor, I enabled resizing, the problem is that it doesn't allow me to resize it smaller than 100x100, how can I lift this limit?我有一个 TimyMCE 编辑器,我启用了调整大小,问题是它不允许我将其调整为小于 100x100,我怎样才能解除这个限制?

This is hardcoded in Editor.js.这是在 Editor.js 中硬编码的。 There is a workaround for this as follows:有一个解决方法如下:

You need to do the resizing by yourself containing this code您需要自己调整包含此代码的大小

var frameid = frameid ? frameid : tinymce.activeEditor.id+'_ifr';
var currentfr=document.getElementById(frameid);
currentfr.height=10; // set height to 10px

in the init method you can include this sniplet to have the editor with less than 100 points在 init 方法中,您可以包含此片段以使编辑器的点数少于 100

setup : function(ed) { ed.onInit.add(function() { 
            document.getElementById(ed.id+'_ifr').style.height='50px'; 
            document.getElementById(ed.id+'_tbl').style.height='auto'; 
        }); },

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM