aboutsummaryrefslogtreecommitdiffstats
path: root/library/tinymce/jscripts/tiny_mce/plugins/xhtmlxtras/js/ins.js
diff options
context:
space:
mode:
Diffstat (limited to 'library/tinymce/jscripts/tiny_mce/plugins/xhtmlxtras/js/ins.js')
-rw-r--r--[-rwxr-xr-x]library/tinymce/jscripts/tiny_mce/plugins/xhtmlxtras/js/ins.js17
1 files changed, 4 insertions, 13 deletions
diff --git a/library/tinymce/jscripts/tiny_mce/plugins/xhtmlxtras/js/ins.js b/library/tinymce/jscripts/tiny_mce/plugins/xhtmlxtras/js/ins.js
index 3774f0a18..c4addfb01 100755..100644
--- a/library/tinymce/jscripts/tiny_mce/plugins/xhtmlxtras/js/ins.js
+++ b/library/tinymce/jscripts/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<elementArray.length; i++) {
var elm = elementArray[i];
setElementAttribs(elm);
@@ -49,14 +50,4 @@ function removeIns() {
tinyMCEPopup.close();
}
-function insertInlineElement(en) {
- var ed = tinyMCEPopup.editor, dom = ed.dom;
-
- ed.getDoc().execCommand('FontName', false, 'mceinline');
- tinymce.each(dom.select(tinymce.isWebKit ? 'span' : 'font'), function(n) {
- if (n.style.fontFamily == 'mceinline' || n.face == 'mceinline')
- dom.replace(dom.create(en), n, 1);
- });
-}
-
tinyMCEPopup.onInit.add(init);