From a2e09c950d8716346b151f7980df1b51ebfbdd78 Mon Sep 17 00:00:00 2001 From: Aleksander Machniak <alec@alec.pl> Date: Tue, 15 Apr 2014 12:35:33 -0400 Subject: [PATCH] Use methods chaining, don't use deprecated row_init method --- program/js/tiny_mce/plugins/xhtmlxtras/js/del.js | 17 ++++++++++------- 1 files changed, 10 insertions(+), 7 deletions(-) diff --git a/program/js/tiny_mce/plugins/xhtmlxtras/js/del.js b/program/js/tiny_mce/plugins/xhtmlxtras/js/del.js index 005a619..1f957dc 100644 --- a/program/js/tiny_mce/plugins/xhtmlxtras/js/del.js +++ b/program/js/tiny_mce/plugins/xhtmlxtras/js/del.js @@ -1,8 +1,11 @@ - /** - * $Id: editor_plugin_src.js 42 2006-08-08 14:32:24Z spocke $ +/** + * del.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,17 +21,17 @@ setAllCommonAttribs(elm); setAttrib(elm, 'datetime'); setAttrib(elm, 'cite'); + elm.removeAttribute('data-mce-new'); } function insertDel() { var elm = tinyMCEPopup.editor.dom.getParent(SXE.focusElement, 'DEL'); - tinyMCEPopup.execCommand('mceBeginUndoLevel'); if (elm == null) { var s = SXE.inst.selection.getContent(); if(s.length > 0) { - tinyMCEPopup.execCommand('mceInsertContent', false, '<del id="#sxe_temp_del#">' + s + '</del>'); - var elementArray = tinymce.grep(SXE.inst.dom.select('del'), function(n) {return n.id == '#sxe_temp_del#';}); + insertInlineElement('del'); + var elementArray = SXE.inst.dom.select('del[data-mce-new]'); for (var i=0; i<elementArray.length; i++) { var elm = elementArray[i]; setElementAttribs(elm); -- Gitblit v1.9.1