Changeset 1069
- Timestamp:
- 10/06/08 16:10:47 (2 months ago)
- Files:
-
- 1 modified
-
trunk/XinhaCore.js (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/XinhaCore.js
r1068 r1069 732 732 * @type Boolean 733 733 */ 734 this.killWordOnPaste = true;734 this.killWordOnPaste = false; 735 735 736 736 /** Enable the 'Target' field in the Make Link dialog. Note that the target attribute is invalid in (X)HTML strict<br /> … … 3718 3718 } 3719 3719 3720 var stripTag = null;3721 if ( Xinha.is_ie )3722 {3723 stripTag = function(el)3724 {3725 el.outerHTML = Xinha.htmlEncode(el.innerText);3726 ++stats.mso_xmlel;3727 };3728 }3729 else3730 {3731 stripTag = function(el)3732 {3733 var txt = document.createTextNode(Xinha.getInnerText(el));3734 el.parentNode.insertBefore(txt, el);3735 Xinha.removeFromParent(el);3736 ++stats.mso_xmlel;3737 };3738 }3739 3740 3720 function removeElements(el) 3741 3721 { … … 3766 3746 function parseTree(root) 3767 3747 { 3768 var tag = root.tagName.toLowerCase(), i, next;3769 3770 3748 clearClass(root); 3771 3749 clearStyle(root); … … 3773 3751 for (var i = root.firstChild; i; i = next ) 3774 3752 { 3775 next = i.nextSibling;3753 var next = i.nextSibling; 3776 3754 if ( i.nodeType == 1 && parseTree(i) ) 3777 3755 { 3778 if ((Xinha.is_ie && root.scopeName != 'HTML') || (!Xinha.is_ie && /:/.test( tag)))3756 if ((Xinha.is_ie && root.scopeName != 'HTML') || (!Xinha.is_ie && /:/.test(i.tagName))) 3779 3757 { 3780 3758 // Nowadays, Word spits out tags like '<o:something />'. Since the … … 3785 3763 // parents of elements that should be their siblings. We reparent 3786 3764 // the children and remove them from the document. 3787 for (var index=i.child ren && ichildren.length-1; i.children && i.children.length && i.children[index]; ++index)3765 for (var index=i.childNodes && i.childNodes.length-1; i.childNodes && i.childNodes.length && i.childNodes[index]; --index) 3788 3766 { 3789 3767 if (i.nextSibling) 3790 3768 { 3791 i.parentNode.insertBefore(i.child ren[index],i.nextSibling);3769 i.parentNode.insertBefore(i.childNodes[index],i.nextSibling); 3792 3770 } 3793 3771 else 3794 3772 { 3795 i.parentNode.appendChild(i.child ren[index]);3773 i.parentNode.appendChild(i.childNodes[index]); 3796 3774 } 3797 Xinha.removeFromParent(i);3798 3775 } 3776 Xinha.removeFromParent(i); 3777 continue; 3799 3778 } 3800 3779 if (checkEmpty(i))
