this.kill_cursor()
}
PeachHTML5Editor.prototype.load_html = function(html) {
- this.tree = peach_parser(html, this.parser_opts)
+ this.tree = peach_parser.parse(html, this.parser_opts)
if (this.tree[0] == null ? true : this.tree[0].parent == null) {
- this.tree = peach_parser('<p style="white-space: pre-wrap"> </p>', this.parser_opts)
+ this.tree = peach_parser.parse('<p style="white-space: pre-wrap"> </p>', this.parser_opts)
}
this.tree_parent = this.tree[0].parent
this.tree_parent.el = this.idoc.body
return doc.children
}
+var this_module = {
+ parse: parse_html,
+ Node: Node,
+}
+
if (context === 'module') {
- module.exports = parse_html
+ module.exports = this_module
} else {
- window.peach_parser = parse_html
+ window.peach_parser = this_module
}
-parse_html.Node = Node
-
}).call(this)