2 * $Id: editor_plugin_src.js 42 2006-08-08 14:32:24Z spocke $
\r
4 * @author Moxiecode - based on work by Andrew Tetlaw
\r
5 * @copyright Copyright © 2004-2006, Moxiecode Systems AB, All rights reserved.
\r
10 tinyMCE.setWindowArg('mce_windowresize', false);
\r
14 tinyMCEPopup.resizeToInnerSize();
\r
15 SXE.initElementDialog('del');
\r
16 if (SXE.currentAction == "update") {
\r
17 setFormValue('datetime', tinyMCE.getAttrib(SXE.updateElement, 'datetime'));
\r
18 setFormValue('cite', tinyMCE.getAttrib(SXE.updateElement, 'cite'));
\r
19 SXE.showRemoveButton();
\r
23 function setElementAttribs(elm) {
\r
24 setAllCommonAttribs(elm);
\r
25 setAttrib(elm, 'datetime');
\r
26 setAttrib(elm, 'cite');
\r
29 function insertDel() {
\r
30 var elm = tinyMCE.getParentElement(SXE.focusElement, 'del');
\r
32 tinyMCEPopup.execCommand('mceBeginUndoLevel');
\r
34 var s = SXE.inst.selection.getSelectedHTML();
\r
36 tinyMCEPopup.execCommand('mceInsertContent', false, '<del id="#sxe_temp_del#">' + s + '</del>');
\r
37 var elementArray = tinyMCE.getElementsByAttributeValue(SXE.inst.getBody(), 'del', 'id', '#sxe_temp_del#');
\r
38 for (var i=0; i<elementArray.length; i++) {
\r
39 var elm = elementArray[i];
\r
40 setElementAttribs(elm);
\r
44 setElementAttribs(elm);
\r
46 tinyMCE.triggerNodeChange();
\r
47 tinyMCEPopup.execCommand('mceEndUndoLevel');
\r
48 tinyMCEPopup.close();
\r
51 function removeDel() {
\r
52 SXE.removeElement('del');
\r
53 tinyMCEPopup.close();
\r