X-Git-Url: https://code.citadel.org/?p=citadel.git;a=blobdiff_plain;f=webcit%2Ftiny_mce%2Fplugins%2Fxhtmlxtras%2Fjs%2Fins.js;h=c4addfb01dadf0d68c3dd49eb2e0008477739e78;hp=3774f0a184f241c61250a6af96658596b59d8d64;hb=b05f4eef4014db3885787ef15107cba93c932ac9;hpb=b347fec899815ec89b2738a0877880ee81e74b59 diff --git a/webcit/tiny_mce/plugins/xhtmlxtras/js/ins.js b/webcit/tiny_mce/plugins/xhtmlxtras/js/ins.js index 3774f0a18..c4addfb01 100644 --- a/webcit/tiny_mce/plugins/xhtmlxtras/js/ins.js +++ b/webcit/tiny_mce/plugins/xhtmlxtras/js/ins.js @@ -21,16 +21,17 @@ function setElementAttribs(elm) { setAllCommonAttribs(elm); setAttrib(elm, 'datetime'); setAttrib(elm, 'cite'); + elm.removeAttribute('data-mce-new'); } function insertIns() { var elm = tinyMCEPopup.editor.dom.getParent(SXE.focusElement, 'INS'); - tinyMCEPopup.execCommand('mceBeginUndoLevel'); + if (elm == null) { var s = SXE.inst.selection.getContent(); if(s.length > 0) { - insertInlineElement('INS'); - var elementArray = tinymce.grep(SXE.inst.dom.select('ins'), function(n) {return n.id == '#sxe_temp_ins#';}); + insertInlineElement('ins'); + var elementArray = SXE.inst.dom.select('ins[data-mce-new]'); for (var i=0; i