1 tinyMCEPopup.requireLangPack();
2 tinyMCEPopup.onInit.add(onLoadInit);
4 function saveContent() {
5 tinyMCEPopup.editor.setContent(document.getElementById('htmlSource').value);
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();
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 toggleWordWrap(elm) {
47 var wHeight=0, wWidth=0, owHeight=0, owWidth=0;
49 function resizeInputs() {
50 var el = document.getElementById('htmlSource');
53 wHeight = self.innerHeight - 65;
54 wWidth = self.innerWidth - 16;
56 wHeight = document.body.clientHeight - 70;
57 wWidth = document.body.clientWidth - 16;
60 el.style.height = Math.abs(wHeight) + 'px';
61 el.style.width = Math.abs(wWidth) + 'px';