Added new functions to add or delete the tinymce editor with an element id

This commit is contained in:
Alejandro Gallardo Escobar 2015-02-04 16:20:20 +01:00
parent 7c410d7ac4
commit a5a2877770
1 changed files with 11 additions and 1 deletions

View File

@ -912,4 +912,14 @@ function show_dialog_qrcode(dialog, text, where, width, height) {
function openURLTagWindow(url) {
window.open(url, '','width=300, height=300, toolbar=no, location=no, directories=no, status=no, menubar=no');
}
}
function removeTinyMCE(elementID) {console.log(elementID);
if (elementID.length > 0 && !isEmptyObject(tinyMCE))
tinyMCE.EditorManager.execCommand('mceRemoveControl', true, elementID);
}
function addTinyMCE(elementID) {
if (elementID.length > 0 && !isEmptyObject(tinyMCE))
tinyMCE.EditorManager.execCommand('mceAddControl', true, elementID);
}