@tiptap/core 2.6.4 → 2.6.6
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/dist/index.cjs +5 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +5 -1
- package/dist/index.js.map +1 -1
- package/dist/index.umd.js +5 -1
- package/dist/index.umd.js.map +1 -1
- package/package.json +3 -3
- package/src/helpers/createNodeFromContent.ts +7 -1
package/dist/index.cjs
CHANGED
|
@@ -1768,7 +1768,11 @@ function createNodeFromContent(content, schema, options) {
|
|
|
1768
1768
|
if (isArrayContent) {
|
|
1769
1769
|
return model.Fragment.fromArray(content.map(item => schema.nodeFromJSON(item)));
|
|
1770
1770
|
}
|
|
1771
|
-
|
|
1771
|
+
const node = schema.nodeFromJSON(content);
|
|
1772
|
+
if (options.errorOnInvalidContent) {
|
|
1773
|
+
node.check();
|
|
1774
|
+
}
|
|
1775
|
+
return node;
|
|
1772
1776
|
}
|
|
1773
1777
|
catch (error) {
|
|
1774
1778
|
if (options.errorOnInvalidContent) {
|