简体   繁体   中英

tinyMCE when on fullscreen mode show HTML CODE by default

when i click Fullscreen button on tinyMCE, it opens in new window.

All i want now is in this new window which has the tinyMCE in full screen, to be in HTML Source code mode by default.

Also, i want the window of "html code editing" to be in full screen.

Thank you!

Try to follow this fiddle for showing HTML code by default

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

Open fullscreen.htm and add onload event to the body like

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

For "html code editing" to be in full screen

Go to themes/advanced/editor_template.js

locate

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.

Hope it helps!!

The fullscreen button will enlarge the tinymce editor to the users fullscreen size. Showing the source code is another operation like you found out yourself already - the html code editing.

To get that in full screen size you will have to adjust the popup size of tinymce html source editor. This can be done using the following tinymce configuration parameter

Unfortunately, you will be able to define a fixed width and heigth only. There is no option to enlarge the code popup window to fullscreen size.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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