prosemirror-model
Advanced tools
Comparing version 1.11.2 to 1.12.0
@@ -0,1 +1,7 @@ | ||
## 1.12.0 (2020-10-11) | ||
### New features | ||
The output of `toDOM` functions can now be a `{dom, contentDOM}` object specifying the precise parent and content DOM elements. | ||
## 1.11.2 (2020-09-12) | ||
@@ -2,0 +8,0 @@ |
{ | ||
"name": "prosemirror-model", | ||
"version": "1.11.2", | ||
"version": "1.12.0", | ||
"description": "ProseMirror's document model", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
@@ -60,3 +60,3 @@ import {Fragment} from "./fragment" | ||
// `"property=value"`, in which case the rule only matches if the | ||
// propery's value exactly matches the given value. (For more | ||
// property's value exactly matches the given value. (For more | ||
// complicated filters, use [`getAttrs`](#model.ParseRule.getAttrs) | ||
@@ -353,3 +353,3 @@ // and return false to indicate that the match failed.) | ||
!mark.isInSet(this.activeMarks)) { | ||
let found = findSameTypeInSet(mark, this.activeMarks); | ||
let found = findSameTypeInSet(mark, this.activeMarks) | ||
if (found) this.stashMarks.push(found) | ||
@@ -356,0 +356,0 @@ this.activeMarks = mark.addToSet(this.activeMarks) |
// DOMOutputSpec:: interface | ||
// A description of a DOM structure. Can be either a string, which is | ||
// interpreted as a text node, a DOM node, which is interpreted as | ||
// itself, or an array. | ||
// itself, a `{dom: Node, contentDOM: ?Node}` object, or an array. | ||
// | ||
@@ -124,2 +124,4 @@ // An array describes a DOM element. The first value in the array | ||
return {dom: structure} | ||
if (structure.dom && structure.dom.nodeType != null) | ||
return structure | ||
let tagName = structure[0], space = tagName.indexOf(" ") | ||
@@ -126,0 +128,0 @@ if (space > 0) { |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
887048
9135