+tinyMCEPopup.requireLangPack();
+tinyMCEPopup.onInit.add(onLoadInit);
+
function saveContent() {
- tinyMCE.setContent(document.getElementById('htmlSource').value);
- tinyMCE.closeWindow(window);
+ tinyMCEPopup.editor.setContent(document.getElementById('htmlSource').value);
+ tinyMCEPopup.close();
}
function onLoadInit() {
tinyMCEPopup.resizeToInnerSize();
// Remove Gecko spellchecking
- if (tinyMCE.isGecko)
- document.body.spellcheck = tinyMCE.getParam("gecko_spellcheck");
-
- document.getElementById('htmlSource').value = tinyMCE.getContent(tinyMCE.getWindowArg('editor_id'));
+ if (tinymce.isGecko)
+ document.body.spellcheck = tinyMCEPopup.editor.getParam("gecko_spellcheck");
- resizeInputs();
+ document.getElementById('htmlSource').value = tinyMCEPopup.editor.getContent();
- if (tinyMCE.getParam("theme_advanced_source_editor_wrap", true)) {
+ if (tinyMCEPopup.editor.getParam("theme_advanced_source_editor_wrap", true)) {
setWrap('soft');
document.getElementById('wraped').checked = true;
}
+
+ resizeInputs();
}
function setWrap(val) {
- var s = document.getElementById('htmlSource');
+ var v, n, s = document.getElementById('htmlSource');
s.wrap = val;
- if (tinyMCE.isGecko || tinyMCE.isOpera) {
- var v = s.value;
- var n = s.cloneNode(false);
+ if (!tinymce.isIE) {
+ v = s.value;
+ n = s.cloneNode(false);
n.setAttribute("wrap", val);
s.parentNode.replaceChild(n, s);
n.value = v;
function resizeInputs() {
var el = document.getElementById('htmlSource');
- if (!tinyMCE.isMSIE) {
- wHeight = self.innerHeight - 60;
+ if (!tinymce.isIE) {
+ wHeight = self.innerHeight - 65;
wWidth = self.innerWidth - 16;
} else {
- wHeight = document.body.clientHeight - 60;
+ wHeight = document.body.clientHeight - 70;
wWidth = document.body.clientWidth - 16;
}