1 tinyMCEPopup.requireLangPack();
2 tinyMCEPopup.onInit.add(onLoadInit);
4 function saveContent() {
5 tinyMCEPopup.editor.setContent(document.getElementById('htmlSource').value, {source_view : true});
9 function onLoadInit() {
10 tinyMCEPopup.resizeToInnerSize();
12 // Remove Gecko spellchecking
14 document.body.spellcheck = tinyMCEPopup.editor.getParam("gecko_spellcheck");
16 document.getElementById('htmlSource').value = tinyMCEPopup.editor.getContent({source_view : true});
18 if (tinyMCEPopup.editor.getParam("theme_advanced_source_editor_wrap", true)) {
20 document.getElementById('wraped').checked = true;
26 function setWrap(val) {
27 var v, n, s = document.getElementById('htmlSource');
33 n = s.cloneNode(false);
34 n.setAttribute("wrap", val);
35 s.parentNode.replaceChild(n, s);
40 function setWhiteSpaceCss(value) {
41 var el = document.getElementById('htmlSource');
42 tinymce.DOM.setStyle(el, 'white-space', value);
45 function turnWrapOff() {
46 if (tinymce.isWebKit) {
47 setWhiteSpaceCss('pre');
53 function turnWrapOn() {
54 if (tinymce.isWebKit) {
55 setWhiteSpaceCss('pre-wrap');
61 function toggleWordWrap(elm) {
69 function resizeInputs() {
70 var vp = tinyMCEPopup.dom.getViewPort(window), el;
72 el = document.getElementById('htmlSource');
75 el.style.width = (vp.w - 20) + 'px';
76 el.style.height = (vp.h - 65) + 'px';