Skip to content

Commit

Permalink
fixed OpenPNE's tinyMCE plugin doesn't convert to op:font correctly (…
Browse files Browse the repository at this point in the history
…fixes #1297)
  • Loading branch information
kawahara committed Jul 6, 2010
1 parent e64bbd0 commit debd81c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 10 deletions.
5 changes: 2 additions & 3 deletions web/js/tiny_mce/plugins/openpne/editor_plugin.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 2 additions & 7 deletions web/js/tiny_mce/plugins/openpne/editor_plugin.js.src
Expand Up @@ -502,13 +502,8 @@

var newObj = editor.dom.create(tagname);
editor.dom.setAttribs(newObj, args);
editor.dom.replace(newObj, targetObj, true);

if (tinymce.isIE) {
newObj.innerHTML = targetObj.innerHTML;
targetObj.parentNode.replaceChild(newObj, targetObj);
} else {
editor.dom.replace(newObj, targetObj, true);
}
tagList = doc.getElementsByTagName(org_tagname);
}
s = editorDoc.innerHTML;
Expand All @@ -522,7 +517,7 @@
rep(/<\/?div>/gi,""); // for Safari

if (Prototype.Browser.IE) {
rep(/<(\/?)op(b|u|s|i|font|large|small|color)/gi, '<$1op:$2');
rep(/<(\/?):?op(b|u|s|i|font|large|small|color)/gi, '<$1op:$2');
}

rep(/<br\s?\/?[^>]*>/gi,"\n\n");
Expand Down

0 comments on commit debd81c

Please sign in to comment.