------- For dealing with MCE editor ----------
function seteditor(content) {
    tinyMCE.activeEditor.setContent(content);   // Set actual MCE editing text
    tinyMCE.activeEditor.setDirty(true);        // Allow saving this restored text
}