Javascript 当编辑器加载时,微型MCE设置全屏?
我在iFrame中的文本区域中使用tiny_mce作为类似word的编辑器。我想使用整个iframe空间。TinyMCE有一个全屏按钮,但我需要在插件加载后自动设置全屏模式。是否有调用此模式(或按钮)的功能/触发器?感谢您的帮助。在IFRAME文档中,您可以指示TinyMCE在文本区域初始化后切换到全屏模式。以下代码需要进入IFRAME:Javascript 当编辑器加载时,微型MCE设置全屏?,javascript,iframe,tinymce,Javascript,Iframe,Tinymce,我在iFrame中的文本区域中使用tiny_mce作为类似word的编辑器。我想使用整个iframe空间。TinyMCE有一个全屏按钮,但我需要在插件加载后自动设置全屏模式。是否有调用此模式(或按钮)的功能/触发器?感谢您的帮助。在IFRAME文档中,您可以指示TinyMCE在文本区域初始化后切换到全屏模式。以下代码需要进入IFRAME: <script type="text/javascript"> tinyMCE.init({ mode : "exact", el
<script type="text/javascript">
tinyMCE.init({
mode : "exact",
elements : "description", // This is the id of the textarea
plugins : "fullscreen",
theme : "advanced",
theme_advanced_buttons1 : "fullscreen,code",
theme_advanced_buttons2 : "",
theme_advanced_toolbar_location : "top",
theme_advanced_toolbar_align : "left",
theme_advanced_statusbar_location : "bottom",
oninit : function() { // Once initialized, tell the editor to go fullscreen
tinyMCE.get('description').execCommand('mceFullScreen');
}
});
</script>
....
<textarea id="description"></textarea>
只需将以下代码插入tinyMCE.init({})函数:
setup : function(ed) {
ed.on('load',function(e){
ed.execCommand('mceFullScreen');
});
},
Ps:如果后面有其他指令,请记住逗号,否则它将失败。
;-) 当tinymce处于全屏状态时,如何在tinymce中设置内容解释代码在答案中的作用并编辑它!
setup : function(ed) {
ed.on('load',function(e){
ed.execCommand('mceFullScreen');
});
setTimeout(\'(function(){tinyMCE.get("YourElementID").execCommand("mceFullScreen");})()\',2500);