diff options
Diffstat (limited to 'program/js/tiny_mce/themes/advanced/js')
-rw-r--r-- | program/js/tiny_mce/themes/advanced/js/anchor.js | 14 | ||||
-rw-r--r-- | program/js/tiny_mce/themes/advanced/js/charmap.js | 10 | ||||
-rw-r--r-- | program/js/tiny_mce/themes/advanced/js/image.js | 4 |
3 files changed, 19 insertions, 9 deletions
diff --git a/program/js/tiny_mce/themes/advanced/js/anchor.js b/program/js/tiny_mce/themes/advanced/js/anchor.js index b5efd1ec9..7fe781055 100644 --- a/program/js/tiny_mce/themes/advanced/js/anchor.js +++ b/program/js/tiny_mce/themes/advanced/js/anchor.js @@ -5,7 +5,7 @@ var AnchorDialog = { var action, elm, f = document.forms[0];
this.editor = ed;
- elm = ed.dom.getParent(ed.selection.getNode(), 'A,IMG');
+ elm = ed.dom.getParent(ed.selection.getNode(), 'A');
v = ed.dom.getAttrib(elm, 'name');
if (v) {
@@ -17,18 +17,18 @@ var AnchorDialog = { },
update : function() {
- var ed = this.editor;
-
+ var ed = this.editor, elm, name = document.forms[0].anchorName.value;
+
tinyMCEPopup.restoreSelection();
if (this.action != 'update')
ed.selection.collapse(1);
- // Webkit acts weird if empty inline element is inserted so we need to use a image instead
- if (tinymce.isWebKit)
- ed.execCommand('mceInsertContent', 0, ed.dom.createHTML('img', {mce_name : 'a', name : document.forms[0].anchorName.value, 'class' : 'mceItemAnchor'}));
+ elm = ed.dom.getParent(ed.selection.getNode(), 'A');
+ if (elm)
+ elm.name = name;
else
- ed.execCommand('mceInsertContent', 0, ed.dom.createHTML('a', {name : document.forms[0].anchorName.value, 'class' : 'mceItemAnchor'}, ''));
+ ed.execCommand('mceInsertContent', 0, ed.dom.createHTML('a', {name : name, 'class' : 'mceItemAnchor'}, ''));
tinyMCEPopup.close();
}
diff --git a/program/js/tiny_mce/themes/advanced/js/charmap.js b/program/js/tiny_mce/themes/advanced/js/charmap.js index 8467ef603..8c5aea172 100644 --- a/program/js/tiny_mce/themes/advanced/js/charmap.js +++ b/program/js/tiny_mce/themes/advanced/js/charmap.js @@ -1,3 +1,13 @@ +/**
+ * charmap.js
+ *
+ * Copyright 2009, Moxiecode Systems AB
+ * Released under LGPL License.
+ *
+ * License: http://tinymce.moxiecode.com/license
+ * Contributing: http://tinymce.moxiecode.com/contributing
+ */
+
tinyMCEPopup.requireLangPack();
var charmap = [
diff --git a/program/js/tiny_mce/themes/advanced/js/image.js b/program/js/tiny_mce/themes/advanced/js/image.js index 4982ce0c8..6423d9080 100644 --- a/program/js/tiny_mce/themes/advanced/js/image.js +++ b/program/js/tiny_mce/themes/advanced/js/image.js @@ -151,8 +151,8 @@ var ImageDialog = { }
// Merge
- st = tinyMCEPopup.dom.parseStyle(dom.serializeStyle(st));
- this.styleVal = dom.serializeStyle(st);
+ st = tinyMCEPopup.dom.parseStyle(dom.serializeStyle(st), 'img');
+ this.styleVal = dom.serializeStyle(st, 'img');
}
},
|