projects
/
roojs1
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
c0d79bf
)
Changed Roo/htmleditor/FilterWord.js
author
Alan
<alan@roojs.com>
Wed, 29 Jun 2022 02:27:12 +0000
(10:27 +0800)
committer
Alan
<alan@roojs.com>
Wed, 29 Jun 2022 02:27:12 +0000
(10:27 +0800)
Roo/htmleditor/FilterWord.js
patch
|
blob
|
history
diff --git
a/Roo/htmleditor/FilterWord.js
b/Roo/htmleditor/FilterWord.js
index
d3d6cc4
..
aef2989
100644
(file)
--- a/
Roo/htmleditor/FilterWord.js
+++ b/
Roo/htmleditor/FilterWord.js
@@
-144,7
+144,7
@@
Roo.extend(Roo.htmleditor.FilterWord, Roo.htmleditor.Filter,
replaceDocBullets : function(doc)
{
// this is a bit odd - but it appears some indents use ql-indent-1
replaceDocBullets : function(doc)
{
// this is a bit odd - but it appears some indents use ql-indent-1
-
//
Roo.log(doc.innerHTML);
+ Roo.log(doc.innerHTML);
var listpara = doc.getElementsByClassName('MsoListParagraphCxSpFirst');
for( var i = 0; i < listpara.length; i ++) {
var listpara = doc.getElementsByClassName('MsoListParagraphCxSpFirst');
for( var i = 0; i < listpara.length; i ++) {
@@
-157,7
+157,12
@@
Roo.extend(Roo.htmleditor.FilterWord, Roo.htmleditor.Filter,
htwo.item(i).className = "MsoListParagraph";
}
}
htwo.item(i).className = "MsoListParagraph";
}
}
-
+ listpara = doc.getElementsByClassName('MsoNormal');
+ for( var i = 0; i < listpara.length; i ++) {
+ if (listpara.item(i).getAttribute('style').match(/mso-list:/)) {
+ listpara.item(i).className = "MsoListParagraph";
+ }
+ }
listpara = doc.getElementsByClassName('ql-indent-1');
while(listpara.length) {
this.replaceDocBullet(listpara.item(0));
listpara = doc.getElementsByClassName('ql-indent-1');
while(listpara.length) {
this.replaceDocBullet(listpara.item(0));
@@
-189,6
+194,12
@@
Roo.extend(Roo.htmleditor.FilterWord, Roo.htmleditor.Filter,
if (!ns.className.match(/(MsoListParagraph|ql-indent-1)/i)) {
break;
}
if (!ns.className.match(/(MsoListParagraph|ql-indent-1)/i)) {
break;
}
+ if (ns.getAttribute('style').match(/mso-list/)) {
+ items.push(ns);
+ ns = ns.nextSibling;
+ has_list = true;
+ continue;
+ }
var spans = ns.getElementsByTagName('span');
if (!spans.length) {
break;
var spans = ns.getElementsByTagName('span');
if (!spans.length) {
break;
@@
-203,10
+214,10
@@
Roo.extend(Roo.htmleditor.FilterWord, Roo.htmleditor.Filter,
if (!has_list) {
break;
}
if (!has_list) {
break;
}
+ items.push(ns);
+ ns = ns.nextSibling;
- items.push(ns);
- ns = ns.nextSibling;
}
if (!items.length) {
ns.className = "";
}
if (!items.length) {
ns.className = "";