Upgrade TinyMCE
[citadel.git] / webcit / tiny_mce / plugins / xhtmlxtras / editor_plugin_src.js
index bef06f2d24e7abbda3a07d21b38c52e68dafdcf7..5f9d9bd50b8dc3d855f08d1a233eff3c43780ac9 100644 (file)
@@ -1,8 +1,11 @@
 /**\r
- * $Id: editor_plugin_src.js 201 2007-02-12 15:56:56Z spocke $\r
+ * editor_plugin_src.js\r
  *\r
- * @author Moxiecode\r
- * @copyright Copyright © 2004-2008, Moxiecode Systems AB, All rights reserved.\r
+ * Copyright 2009, Moxiecode Systems AB\r
+ * Released under LGPL License.\r
+ *\r
+ * License: http://tinymce.moxiecode.com/license\r
+ * Contributing: http://tinymce.moxiecode.com/contributing\r
  */\r
 \r
 (function() {\r
                        ed.addButton('ins', {title : 'xhtmlxtras.ins_desc', cmd : 'mceIns'});\r
                        ed.addButton('attribs', {title : 'xhtmlxtras.attribs_desc', cmd : 'mceAttributes'});\r
 \r
-                       if (tinymce.isIE) {\r
-                               function fix(ed, o) {\r
-                                       if (o.set) {\r
-                                               o.content = o.content.replace(/<abbr([^>]+)>/gi, '<html:abbr $1>');\r
-                                               o.content = o.content.replace(/<\/abbr>/gi, '</html:abbr>');\r
-                                       }\r
-                               };\r
-\r
-                               ed.onBeforeSetContent.add(fix);\r
-                               ed.onPostProcess.add(fix);\r
-                       }\r
-\r
                        ed.onNodeChange.add(function(ed, cm, n, co) {\r
                                n = ed.dom.getParent(n, 'CITE,ACRONYM,ABBR,DEL,INS');\r
 \r
                                        } while (n = n.parentNode);\r
                                }\r
                        });\r
+\r
+                       ed.onPreInit.add(function() {\r
+                               // Fixed IE issue where it can't handle these elements correctly\r
+                               ed.dom.create('abbr');\r
+                       });\r
                },\r
 \r
                getInfo : function() {\r