X-Git-Url: https://code.citadel.org/?a=blobdiff_plain;f=webcit%2Ftiny_mce%2Fplugins%2Fxhtmlxtras%2Fjs%2Fins.js;h=c4addfb01dadf0d68c3dd49eb2e0008477739e78;hb=b05f4eef4014db3885787ef15107cba93c932ac9;hp=4fcc998256fb902ec0f9b9c6f47b6f4afefd4927;hpb=7ce246db4a173b9c738e8e160f8d0030d4e82d78;p=citadel.git diff --git a/webcit/tiny_mce/plugins/xhtmlxtras/js/ins.js b/webcit/tiny_mce/plugins/xhtmlxtras/js/ins.js index 4fcc99825..c4addfb01 100644 --- a/webcit/tiny_mce/plugins/xhtmlxtras/js/ins.js +++ b/webcit/tiny_mce/plugins/xhtmlxtras/js/ins.js @@ -1,8 +1,11 @@ - /** - * $Id: editor_plugin_src.js 42 2006-08-08 14:32:24Z spocke $ +/** + * ins.js * - * @author Moxiecode - based on work by Andrew Tetlaw - * @copyright Copyright © 2004-2008, Moxiecode Systems AB, All rights reserved. + * Copyright 2009, Moxiecode Systems AB + * Released under LGPL License. + * + * License: http://tinymce.moxiecode.com/license + * Contributing: http://tinymce.moxiecode.com/contributing */ function init() { @@ -18,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