@tiptap/core 2.6.5 → 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 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
- return schema.nodeFromJSON(content);
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) {