|
@@ -3362,6 +3362,13 @@ function parseTextDom(nodes){
|
|
|
// record the href attribute for cross reference
|
|
|
n.attrs = {'href':nodes[i].attributes.href.value};
|
|
|
}
|
|
|
+ if (n.tag == 'img') {
|
|
|
+ // record the href attribute for cross reference
|
|
|
+ n.attrs = {
|
|
|
+ 'src':nodes[i].attributes.src.value,
|
|
|
+ 'alt':nodes[i].attributes.alt.value
|
|
|
+ };
|
|
|
+ }
|
|
|
if(nodes[i].childNodes.length){
|
|
|
// again parse node's childs
|
|
|
n.childs = parseTextDom(nodes[i].childNodes);
|
|
@@ -3412,6 +3419,9 @@ var _Text = {
|
|
|
this.textdom = new DOMParser().parseFromString(this.texthtml, "text/html");
|
|
|
// get the text nodes (avoid html document extra)
|
|
|
this.textchilds = parseTextDom(this.textdom.getElementsByTagName('body')[0].childNodes);
|
|
|
+ if(this.id == "115sc"){
|
|
|
+ console.log(this.textchilds);
|
|
|
+ }
|
|
|
},
|
|
|
oninit: function(vn){
|
|
|
this.id = vn.attrs.id;
|