在全屏模式下,tinyMCE默认显示HTML CODE

时间:2013-01-11 09:34:14

标签: javascript html api editor tinymce

当我点击tinyMCE上的全屏按钮时,它会在新窗口中打开。

我现在想要的只是在这个新窗口中全屏显示tinyMCE,默认情况下处于HTML源代码模式。

另外,我希望“html代码编辑”窗口全屏显示。

谢谢!

2 个答案:

答案 0 :(得分:1)

默认情况下,请尝试按照此fiddle显示HTML代码

In order to implement it in FullScreen Plugin go to 
plugins/fullscreen/fullscreen.htm

打开fullscreen.htm并将onload事件添加到正文中,如

onload="setTimeout(tinyMCE.activeEditor.execCommand('mceCodeEditor'),200)"

使“html代码编辑”全屏显示

Go to themes/advanced/editor_template.js

找到

width : parseInt(ed.getParam("theme_advanced_source_editor_width", 720)),
height : parseInt(ed.getParam("theme_advanced_source_editor_height", 580)),

replace 720 and 580 by screen.availWidth, screen.availHeight respectively.

Also clear your browser cache.

希望它有所帮助!!

答案 1 :(得分:0)

全屏按钮会将tinymce编辑器放大到用户全屏大小。显示源代码是您已经发现的另一种操作 - HTML代码编辑。

要以全屏尺寸获取,您必须调整tinymce html源编辑器的弹出窗口大小。这可以使用以下tinymce配置参数

来完成

不幸的是,您只能定义固定的宽度和高度。没有选项可以将代码弹出窗口放大到全屏大小。