javascript - tinyMCE 在全屏模式下默认显示 HTML 代码

标签 javascript html api editor tinymce

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

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

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

谢谢!

最佳答案

尝试关注这个 fiddle用于默认显示 HTML 代码

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

打开fullscreen.htm 并添加onload 事件到body like

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.

希望对您有所帮助!

关于javascript - tinyMCE 在全屏模式下默认显示 HTML 代码,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14275208/

相关文章:

.net - MQMessage 探索(使用 WebSphere MQ .NET API)

api - 在 .net core web api 中存储 JWT token 的位置?

javascript - 或者正则表达式中的运算符

javascript - 邮寄地址 : multiple addresses using Cognos data item

javascript - 为什么我的 Ajax 成功函数永远不会触发?

html - 在定义的级别后隐藏第 n 个嵌套的 UL

html - css 覆盖原因

facebook - 将状态更新发布到 Facebook 页面(粉丝网站)

javascript - Angular 5 仅对模糊进行验证?

php - JavaScript文本区域字符计数器插入选项卡