tiptap/packages/core/src/helpers
Nick Perez 74bfdc5bef
feat: error handling of invalid content for a schema (#5178)
This change introduces two new top-level options to the editor: `enableContentCheck` & `onContentError` for dealing with content supplied that does not match the prose-mirror schema generated by the set of tiptap extensions.

`enableContentCheck` allows the app developer to opt into the behavior to check for invalid schemas (this change is otherwise backwards compatible).
When true, this will try to parse the document, and any content that does not match the schema will emit a `contentError` which can be listened to via the `onContentError` callback.
2024-06-04 09:32:54 +02:00
..
combineTransactionSteps.ts refactor(core): add jsdocs for utility functions (#5141) 2024-05-13 18:28:53 +02:00
createChainableState.ts refactor(core): add jsdocs for utility functions (#5141) 2024-05-13 18:28:53 +02:00
createDocument.ts feat: error handling of invalid content for a schema (#5178) 2024-06-04 09:32:54 +02:00
createNodeFromContent.ts feat: error handling of invalid content for a schema (#5178) 2024-06-04 09:32:54 +02:00
defaultBlockAt.ts refactor(core): add jsdocs for utility functions (#5141) 2024-05-13 18:28:53 +02:00
findChildren.ts refactor(core): add jsdocs for utility functions (#5141) 2024-05-13 18:28:53 +02:00
findChildrenInRange.ts refactor(core): add jsdocs for utility functions (#5141) 2024-05-13 18:28:53 +02:00
findParentNode.ts refactor(core): add jsdocs for utility functions (#5141) 2024-05-13 18:28:53 +02:00
findParentNodeClosestToPos.ts refactor(core): add jsdocs for utility functions (#5141) 2024-05-13 18:28:53 +02:00
generateHTML.ts refactor(core): add jsdocs for utility functions (#5141) 2024-05-13 18:28:53 +02:00
generateJSON.ts refactor(core): add jsdocs for utility functions (#5141) 2024-05-13 18:28:53 +02:00
generateText.ts refactor(core): add jsdocs for utility functions (#5141) 2024-05-13 18:28:53 +02:00
getAttributes.ts refactor(core): add jsdocs for utility functions (#5141) 2024-05-13 18:28:53 +02:00
getAttributesFromExtensions.ts Require file extensions for imports and exports (#4001) 2023-06-30 21:03:49 +02:00
getChangedRanges.ts Require file extensions for imports and exports (#4001) 2023-06-30 21:03:49 +02:00
getDebugJSON.ts Require file extensions for imports and exports (#4001) 2023-06-30 21:03:49 +02:00
getExtensionField.ts refactor(core): clean up constructor & extension setup in extension manager (#5035) 2024-05-14 14:43:53 +02:00
getHTMLFromFragment.ts feat(pm): new prosemirror package for dependency resolving 2023-02-02 17:37:33 +01:00
getMarkAttributes.ts Require file extensions for imports and exports (#4001) 2023-06-30 21:03:49 +02:00
getMarkRange.ts Require file extensions for imports and exports (#4001) 2023-06-30 21:03:49 +02:00
getMarksBetween.ts fix: fix bug #4785 (#4836) 2024-01-29 09:19:34 +01:00
getMarkType.ts feat(pm): new prosemirror package for dependency resolving 2023-02-02 17:37:33 +01:00
getNodeAtPosition.ts fix(lists): improve list behaviour 2023-03-28 14:21:16 +02:00
getNodeAttributes.ts Require file extensions for imports and exports (#4001) 2023-06-30 21:03:49 +02:00
getNodeType.ts feat(pm): new prosemirror package for dependency resolving 2023-02-02 17:37:33 +01:00
getRenderedAttributes.ts Require file extensions for imports and exports (#4001) 2023-06-30 21:03:49 +02:00
getSchema.ts Require file extensions for imports and exports (#4001) 2023-06-30 21:03:49 +02:00
getSchemaByResolvedExtensions.ts refactor(core): add jsdocs for utility functions (#5141) 2024-05-13 18:28:53 +02:00
getSchemaTypeByName.ts refactor(core): add jsdocs for utility functions (#5141) 2024-05-13 18:28:53 +02:00
getSchemaTypeNameByName.ts refactor(core): add jsdocs for utility functions (#5141) 2024-05-13 18:28:53 +02:00
getSplittedAttributes.ts refactor(core): add jsdocs for utility functions (#5141) 2024-05-13 18:28:53 +02:00
getText.ts refactor(core): add jsdocs for utility functions (#5141) 2024-05-13 18:28:53 +02:00
getTextBetween.ts refactor(core): add jsdocs for utility functions (#5141) 2024-05-13 18:28:53 +02:00
getTextContentFromNodes.ts refactor(core): add jsdocs for utility functions (#5141) 2024-05-13 18:28:53 +02:00
getTextSerializersFromSchema.ts refactor(core): add jsdocs for utility functions (#5141) 2024-05-13 18:28:53 +02:00
index.ts fix(core): fix broken export 2023-08-18 11:06:50 -07:00
injectExtensionAttributesToParseRule.ts Require file extensions for imports and exports (#4001) 2023-06-30 21:03:49 +02:00
isActive.ts Require file extensions for imports and exports (#4001) 2023-06-30 21:03:49 +02:00
isAtEndOfNode.ts Fix List issues & add support for Mod keys (#4210) 2023-08-03 10:19:32 +02:00
isAtStartOfNode.ts fix(lists): improve list behaviour 2023-03-28 14:21:16 +02:00
isExtensionRulesEnabled.ts Require file extensions for imports and exports (#4001) 2023-06-30 21:03:49 +02:00
isList.ts Require file extensions for imports and exports (#4001) 2023-06-30 21:03:49 +02:00
isMarkActive.ts Require file extensions for imports and exports (#4001) 2023-06-30 21:03:49 +02:00
isNodeActive.ts Require file extensions for imports and exports (#4001) 2023-06-30 21:03:49 +02:00
isNodeEmpty.ts feat(pm): new prosemirror package for dependency resolving 2023-02-02 17:37:33 +01:00
isNodeSelection.ts feat(pm): new prosemirror package for dependency resolving 2023-02-02 17:37:33 +01:00
isTextSelection.ts feat(pm): new prosemirror package for dependency resolving 2023-02-02 17:37:33 +01:00
posToDOMRect.ts Require file extensions for imports and exports (#4001) 2023-06-30 21:03:49 +02:00
resolveFocusPosition.ts Require file extensions for imports and exports (#4001) 2023-06-30 21:03:49 +02:00
selectionToInsertionEnd.ts feat(pm): new prosemirror package for dependency resolving 2023-02-02 17:37:33 +01:00
splitExtensions.ts Require file extensions for imports and exports (#4001) 2023-06-30 21:03:49 +02:00