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=eb5fb3f6c3b3e1d4d3d7ebbb92b8c60d70d13254;hpb=51c6986e64a4405c3971acd67be1d3528ab69539 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