@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.js CHANGED
@@ -1766,7 +1766,11 @@ function createNodeFromContent(content, schema, options) {
1766
1766
  if (isArrayContent) {
1767
1767
  return Fragment.fromArray(content.map(item => schema.nodeFromJSON(item)));
1768
1768
  }
1769
- return schema.nodeFromJSON(content);
1769
+ const node = schema.nodeFromJSON(content);
1770
+ if (options.errorOnInvalidContent) {
1771
+ node.check();
1772
+ }
1773
+ return node;
1770
1774
  }
1771
1775
  catch (error) {
1772
1776
  if (options.errorOnInvalidContent) {