prosemirror-view 1.23.4 → 1.23.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +6 -0
- package/dist/index.es.js +2 -2
- package/dist/index.es.js.map +1 -1
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
- package/src/domchange.js +1 -1
- package/src/viewdesc.js +1 -1
package/CHANGELOG.md
CHANGED
package/dist/index.es.js
CHANGED
|
@@ -1290,7 +1290,7 @@ var NodeViewDesc = /*@__PURE__*/(function (ViewDesc) {
|
|
|
1290
1290
|
// attrs in the dom, that won't be picked up. Not entirely sure
|
|
1291
1291
|
// whether this is a problem
|
|
1292
1292
|
var rule = {node: this.node.type.name, attrs: this.node.attrs};
|
|
1293
|
-
if (this.node.type.
|
|
1293
|
+
if (this.node.type.whitespace == "pre") { rule.preserveWhitespace = "full"; }
|
|
1294
1294
|
if (this.contentDOM && !this.contentLost) { rule.contentElement = this.contentDOM; }
|
|
1295
1295
|
else { rule.getContent = function () { return this$1.contentDOM ? Fragment.empty : this$1.node.content; }; }
|
|
1296
1296
|
return rule
|
|
@@ -2620,7 +2620,7 @@ function parseBetween(view, from_, to_) {
|
|
|
2620
2620
|
topOpen: true,
|
|
2621
2621
|
from: fromOffset,
|
|
2622
2622
|
to: toOffset,
|
|
2623
|
-
preserveWhitespace: $from.parent.type.
|
|
2623
|
+
preserveWhitespace: $from.parent.type.whitespace == "pre" ? "full" : true,
|
|
2624
2624
|
editableContent: true,
|
|
2625
2625
|
findPositions: find,
|
|
2626
2626
|
ruleFromNode: ruleFromNode,
|