Browse Source

Create text nodes during HTML parsing

pull/3229/head
Artur Arseniev 5 years ago
parent
commit
c2c64cc45c
  1. 5
      src/parser/model/ParserHtml.js

5
src/parser/model/ParserHtml.js

@ -202,7 +202,10 @@ export default config => {
// just make it content of the current node
if (nodeChild === 1 && firstChild.nodeType === 3) {
!model.type && (model.type = 'text');
model.components = firstChild.nodeValue;
model.components = {
type: 'textnode',
content: firstChild.nodeValue
};
} else {
model.components = this.parseNode(node);
}

Loading…
Cancel
Save