@tiptap/starter-kit 2.0.0-beta.105 → 2.0.0-beta.106
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 +8 -0
- package/dist/demos/setup/helper.d.ts +2 -0
- package/dist/demos/setup/react.d.ts +3 -0
- package/dist/demos/setup/vue.d.ts +3 -0
- package/dist/demos/src/Examples/Savvy/Vue/ColorHighlighter.d.ts +2 -0
- package/dist/demos/src/Examples/Savvy/Vue/SmilieReplacer.d.ts +2 -0
- package/dist/demos/src/Examples/Savvy/Vue/findColors.d.ts +3 -0
- package/dist/demos/src/Experiments/CollaborationAnnotation/Vue/extension/AnnotationItem.d.ts +10 -0
- package/dist/demos/src/Experiments/CollaborationAnnotation/Vue/extension/AnnotationPlugin.d.ts +12 -0
- package/dist/demos/src/Experiments/CollaborationAnnotation/Vue/extension/AnnotationState.d.ts +27 -0
- package/dist/demos/src/Experiments/CollaborationAnnotation/Vue/extension/collaboration-annotation.d.ts +49 -0
- package/dist/demos/src/Experiments/CollaborationAnnotation/Vue/extension/index.d.ts +3 -0
- package/dist/demos/src/Experiments/Details/Vue/details-summary.d.ts +8 -0
- package/dist/demos/src/Experiments/Details/Vue/details.d.ts +26 -0
- package/dist/demos/src/Experiments/Embeds/Vue/iframe.d.ts +21 -0
- package/dist/demos/src/Experiments/Figure/Vue/figure.d.ts +29 -0
- package/dist/demos/src/Experiments/GenericFigure/Vue/figcaption.d.ts +4 -0
- package/dist/demos/src/Experiments/GenericFigure/Vue/figure.d.ts +4 -0
- package/dist/demos/src/Experiments/Linter/Vue/extension/Linter.d.ts +6 -0
- package/dist/demos/src/Experiments/Linter/Vue/extension/LinterPlugin.d.ts +15 -0
- package/dist/demos/src/Experiments/Linter/Vue/extension/index.d.ts +6 -0
- package/dist/demos/src/Experiments/Linter/Vue/extension/plugins/BadWords.d.ts +5 -0
- package/dist/demos/src/Experiments/Linter/Vue/extension/plugins/HeadingLevel.d.ts +6 -0
- package/dist/demos/src/Experiments/Linter/Vue/extension/plugins/Punctuation.d.ts +7 -0
- package/dist/demos/src/Experiments/TrailingNode/Vue/trailing-node.d.ts +11 -0
- package/dist/demos/vite.config.d.ts +2 -0
- package/dist/packages/core/src/CommandManager.d.ts +13 -0
- package/dist/packages/core/src/Editor.d.ts +140 -0
- package/dist/packages/core/src/EventEmitter.d.ts +7 -0
- package/dist/packages/core/src/Extension.d.ts +193 -0
- package/dist/packages/core/src/ExtensionManager.d.ts +18 -0
- package/dist/packages/core/src/Mark.d.ts +269 -0
- package/dist/packages/core/src/Node.d.ts +339 -0
- package/dist/packages/core/src/NodeView.d.ts +27 -0
- package/dist/packages/core/src/Tracker.d.ts +11 -0
- package/dist/packages/core/src/commands/blur.d.ts +12 -0
- package/dist/packages/core/src/commands/clearContent.d.ts +12 -0
- package/dist/packages/core/src/commands/clearNodes.d.ts +12 -0
- package/dist/packages/core/src/commands/command.d.ts +12 -0
- package/dist/packages/core/src/commands/createParagraphNear.d.ts +12 -0
- package/dist/packages/core/src/commands/deleteNode.d.ts +13 -0
- package/dist/packages/core/src/commands/deleteRange.d.ts +12 -0
- package/dist/packages/core/src/commands/deleteSelection.d.ts +12 -0
- package/dist/packages/core/src/commands/enter.d.ts +12 -0
- package/dist/packages/core/src/commands/exitCode.d.ts +12 -0
- package/dist/packages/core/src/commands/extendMarkRange.d.ts +13 -0
- package/dist/packages/core/src/commands/first.d.ts +12 -0
- package/dist/packages/core/src/commands/focus.d.ts +12 -0
- package/dist/packages/core/src/commands/forEach.d.ts +14 -0
- package/dist/packages/core/src/commands/insertContent.d.ts +13 -0
- package/dist/packages/core/src/commands/insertContentAt.d.ts +13 -0
- package/dist/packages/core/src/commands/joinBackward.d.ts +12 -0
- package/dist/packages/core/src/commands/joinForward.d.ts +12 -0
- package/dist/packages/core/src/commands/keyboardShortcut.d.ts +12 -0
- package/dist/packages/core/src/commands/lift.d.ts +13 -0
- package/dist/packages/core/src/commands/liftEmptyBlock.d.ts +12 -0
- package/dist/packages/core/src/commands/liftListItem.d.ts +13 -0
- package/dist/packages/core/src/commands/newlineInCode.d.ts +12 -0
- package/dist/packages/core/src/commands/resetAttributes.d.ts +13 -0
- package/dist/packages/core/src/commands/scrollIntoView.d.ts +12 -0
- package/dist/packages/core/src/commands/selectAll.d.ts +12 -0
- package/dist/packages/core/src/commands/selectNodeBackward.d.ts +12 -0
- package/dist/packages/core/src/commands/selectNodeForward.d.ts +12 -0
- package/dist/packages/core/src/commands/selectParentNode.d.ts +12 -0
- package/dist/packages/core/src/commands/setContent.d.ts +13 -0
- package/dist/packages/core/src/commands/setMark.d.ts +13 -0
- package/dist/packages/core/src/commands/setMeta.d.ts +12 -0
- package/dist/packages/core/src/commands/setNode.d.ts +13 -0
- package/dist/packages/core/src/commands/setNodeSelection.d.ts +12 -0
- package/dist/packages/core/src/commands/setTextSelection.d.ts +12 -0
- package/dist/packages/core/src/commands/sinkListItem.d.ts +13 -0
- package/dist/packages/core/src/commands/splitBlock.d.ts +14 -0
- package/dist/packages/core/src/commands/splitListItem.d.ts +13 -0
- package/dist/packages/core/src/commands/toggleList.d.ts +13 -0
- package/dist/packages/core/src/commands/toggleMark.d.ts +18 -0
- package/dist/packages/core/src/commands/toggleNode.d.ts +13 -0
- package/dist/packages/core/src/commands/toggleWrap.d.ts +13 -0
- package/dist/packages/core/src/commands/undoInputRule.d.ts +12 -0
- package/dist/packages/core/src/commands/unsetAllMarks.d.ts +12 -0
- package/dist/packages/core/src/commands/unsetMark.d.ts +18 -0
- package/dist/packages/core/src/commands/updateAttributes.d.ts +13 -0
- package/dist/packages/core/src/commands/wrapIn.d.ts +13 -0
- package/dist/packages/core/src/commands/wrapInList.d.ts +13 -0
- package/dist/packages/core/src/extensions/clipboardTextSerializer.d.ts +2 -0
- package/dist/packages/core/src/extensions/commands.d.ts +98 -0
- package/dist/packages/core/src/extensions/editable.d.ts +2 -0
- package/dist/packages/core/src/extensions/focusEvents.d.ts +2 -0
- package/dist/packages/core/src/extensions/index.d.ts +5 -0
- package/dist/packages/core/src/extensions/keymap.d.ts +2 -0
- package/dist/packages/core/src/helpers/createDocument.d.ts +3 -0
- package/dist/packages/core/src/helpers/createNodeFromContent.d.ts +7 -0
- package/dist/packages/core/src/helpers/findChildren.d.ts +3 -0
- package/dist/packages/core/src/helpers/findChildrenInRange.d.ts +6 -0
- package/dist/packages/core/src/helpers/findParentNode.d.ts +9 -0
- package/dist/packages/core/src/helpers/findParentNodeClosestToPos.d.ts +8 -0
- package/dist/packages/core/src/helpers/generateHTML.d.ts +2 -0
- package/dist/packages/core/src/helpers/generateJSON.d.ts +2 -0
- package/dist/packages/core/src/helpers/generateText.d.ts +5 -0
- package/dist/packages/core/src/helpers/getAttributes.d.ts +3 -0
- package/dist/packages/core/src/helpers/getAttributesFromExtensions.d.ts +6 -0
- package/dist/packages/core/src/helpers/getDebugJSON.d.ts +8 -0
- package/dist/packages/core/src/helpers/getExtensionField.d.ts +2 -0
- package/dist/packages/core/src/helpers/getHTMLFromFragment.d.ts +2 -0
- package/dist/packages/core/src/helpers/getMarkAttributes.d.ts +3 -0
- package/dist/packages/core/src/helpers/getMarkRange.d.ts +3 -0
- package/dist/packages/core/src/helpers/getMarkType.d.ts +2 -0
- package/dist/packages/core/src/helpers/getMarksBetween.d.ts +3 -0
- package/dist/packages/core/src/helpers/getNodeAttributes.d.ts +3 -0
- package/dist/packages/core/src/helpers/getNodeType.d.ts +2 -0
- package/dist/packages/core/src/helpers/getRenderedAttributes.d.ts +3 -0
- package/dist/packages/core/src/helpers/getSchema.d.ts +3 -0
- package/dist/packages/core/src/helpers/getSchemaByResolvedExtensions.d.ts +3 -0
- package/dist/packages/core/src/helpers/getSchemaTypeByName.d.ts +2 -0
- package/dist/packages/core/src/helpers/getSchemaTypeNameByName.d.ts +2 -0
- package/dist/packages/core/src/helpers/getSplittedAttributes.d.ts +2 -0
- package/dist/packages/core/src/helpers/getText.d.ts +6 -0
- package/dist/packages/core/src/helpers/getTextBetween.d.ts +6 -0
- package/dist/packages/core/src/helpers/getTextSeralizersFromSchema.d.ts +3 -0
- package/dist/packages/core/src/helpers/injectExtensionAttributesToParseRule.d.ts +9 -0
- package/dist/packages/core/src/helpers/isActive.d.ts +2 -0
- package/dist/packages/core/src/helpers/isList.d.ts +2 -0
- package/dist/packages/core/src/helpers/isMarkActive.d.ts +3 -0
- package/dist/packages/core/src/helpers/isNodeActive.d.ts +3 -0
- package/dist/packages/core/src/helpers/isNodeEmpty.d.ts +2 -0
- package/dist/packages/core/src/helpers/isNodeSelection.d.ts +2 -0
- package/dist/packages/core/src/helpers/isTextSelection.d.ts +2 -0
- package/dist/packages/core/src/helpers/posToDOMRect.d.ts +2 -0
- package/dist/packages/core/src/helpers/selectionToInsertionEnd.d.ts +2 -0
- package/dist/packages/core/src/helpers/splitExtensions.d.ts +9 -0
- package/dist/packages/core/src/index.d.ts +48 -0
- package/dist/packages/core/src/inputRules/markInputRule.d.ts +3 -0
- package/dist/packages/core/src/inputRules/nodeInputRule.d.ts +3 -0
- package/dist/packages/core/src/pasteRules/markPasteRule.d.ts +3 -0
- package/dist/packages/core/src/style.d.ts +2 -0
- package/dist/packages/core/src/types.d.ts +193 -0
- package/dist/packages/core/src/utilities/callOrReturn.d.ts +9 -0
- package/dist/packages/core/src/utilities/createStyleTag.d.ts +1 -0
- package/dist/packages/core/src/utilities/deleteProps.d.ts +6 -0
- package/dist/packages/core/src/utilities/elementFromString.d.ts +1 -0
- package/dist/packages/core/src/utilities/fromString.d.ts +1 -0
- package/dist/packages/core/src/utilities/isClass.d.ts +1 -0
- package/dist/packages/core/src/utilities/isEmptyObject.d.ts +1 -0
- package/dist/packages/core/src/utilities/isObject.d.ts +1 -0
- package/dist/packages/core/src/utilities/isPlainObject.d.ts +1 -0
- package/dist/packages/core/src/utilities/isRegExp.d.ts +1 -0
- package/dist/packages/core/src/utilities/isiOS.d.ts +1 -0
- package/dist/packages/core/src/utilities/mergeAttributes.d.ts +1 -0
- package/dist/packages/core/src/utilities/mergeDeep.d.ts +1 -0
- package/dist/packages/core/src/utilities/minMax.d.ts +1 -0
- package/dist/packages/core/src/utilities/objectIncludes.d.ts +8 -0
- package/dist/packages/core/src/utilities/removeElement.d.ts +1 -0
- package/dist/packages/extension-blockquote/src/blockquote.d.ts +24 -0
- package/dist/packages/extension-blockquote/src/index.d.ts +3 -0
- package/dist/packages/extension-bold/src/bold.d.ts +27 -0
- package/dist/packages/extension-bold/src/index.d.ts +3 -0
- package/dist/packages/extension-bubble-menu/src/bubble-menu-plugin.d.ts +43 -0
- package/dist/packages/extension-bubble-menu/src/bubble-menu.d.ts +6 -0
- package/dist/packages/extension-bubble-menu/src/index.d.ts +4 -0
- package/dist/packages/extension-bullet-list/src/bullet-list.d.ts +16 -0
- package/dist/packages/extension-bullet-list/src/index.d.ts +3 -0
- package/dist/packages/extension-character-count/src/character-count.d.ts +7 -0
- package/dist/packages/extension-character-count/src/index.d.ts +3 -0
- package/dist/packages/extension-code/src/code.d.ts +25 -0
- package/dist/packages/extension-code/src/index.d.ts +3 -0
- package/dist/packages/extension-code-block/src/code-block.d.ts +26 -0
- package/dist/packages/extension-code-block/src/index.d.ts +3 -0
- package/dist/packages/extension-code-block-lowlight/src/code-block-lowlight.d.ts +5 -0
- package/dist/packages/extension-code-block-lowlight/src/index.d.ts +3 -0
- package/dist/packages/extension-code-block-lowlight/src/lowlight-plugin.d.ts +5 -0
- package/dist/packages/extension-collaboration/src/collaboration.d.ts +30 -0
- package/dist/packages/extension-collaboration/src/index.d.ts +3 -0
- package/dist/packages/extension-collaboration-cursor/src/collaboration-cursor.d.ts +21 -0
- package/dist/packages/extension-collaboration-cursor/src/index.d.ts +3 -0
- package/dist/packages/extension-color/src/color.d.ts +21 -0
- package/dist/packages/extension-color/src/index.d.ts +3 -0
- package/dist/packages/extension-document/src/document.d.ts +2 -0
- package/dist/packages/extension-document/src/index.d.ts +3 -0
- package/dist/packages/extension-dropcursor/src/dropcursor.d.ts +7 -0
- package/dist/packages/extension-dropcursor/src/index.d.ts +3 -0
- package/dist/packages/extension-floating-menu/src/floating-menu-plugin.d.ts +40 -0
- package/dist/packages/extension-floating-menu/src/floating-menu.d.ts +6 -0
- package/dist/packages/extension-floating-menu/src/index.d.ts +4 -0
- package/dist/packages/extension-focus/src/focus.d.ts +6 -0
- package/dist/packages/extension-focus/src/index.d.ts +3 -0
- package/dist/packages/extension-font-family/src/font-family.d.ts +21 -0
- package/dist/packages/extension-font-family/src/index.d.ts +3 -0
- package/dist/packages/extension-gapcursor/src/gapcursor.d.ts +14 -0
- package/dist/packages/extension-gapcursor/src/index.d.ts +3 -0
- package/dist/packages/extension-hard-break/src/hard-break.d.ts +15 -0
- package/dist/packages/extension-hard-break/src/index.d.ts +3 -0
- package/dist/packages/extension-heading/src/heading.d.ts +26 -0
- package/dist/packages/extension-heading/src/index.d.ts +3 -0
- package/dist/packages/extension-highlight/src/highlight.d.ts +30 -0
- package/dist/packages/extension-highlight/src/index.d.ts +3 -0
- package/dist/packages/extension-history/src/history.d.ts +20 -0
- package/dist/packages/extension-history/src/index.d.ts +3 -0
- package/dist/packages/extension-horizontal-rule/src/horizontal-rule.d.ts +15 -0
- package/dist/packages/extension-horizontal-rule/src/index.d.ts +3 -0
- package/dist/packages/extension-image/src/image.d.ts +21 -0
- package/dist/packages/extension-image/src/index.d.ts +3 -0
- package/dist/packages/extension-italic/src/index.d.ts +3 -0
- package/dist/packages/extension-italic/src/italic.d.ts +27 -0
- package/dist/packages/extension-link/src/index.d.ts +3 -0
- package/dist/packages/extension-link/src/link.d.ts +48 -0
- package/dist/packages/extension-list-item/src/index.d.ts +3 -0
- package/dist/packages/extension-list-item/src/list-item.d.ts +5 -0
- package/dist/packages/extension-mention/src/index.d.ts +3 -0
- package/dist/packages/extension-mention/src/mention.d.ts +14 -0
- package/dist/packages/extension-ordered-list/src/index.d.ts +3 -0
- package/dist/packages/extension-ordered-list/src/ordered-list.d.ts +16 -0
- package/dist/packages/extension-paragraph/src/index.d.ts +3 -0
- package/dist/packages/extension-paragraph/src/paragraph.d.ts +15 -0
- package/dist/packages/extension-placeholder/src/index.d.ts +3 -0
- package/dist/packages/extension-placeholder/src/placeholder.d.ts +14 -0
- package/dist/packages/extension-strike/src/index.d.ts +3 -0
- package/dist/packages/extension-strike/src/strike.d.ts +25 -0
- package/dist/packages/extension-subscript/src/index.d.ts +3 -0
- package/dist/packages/extension-subscript/src/subscript.d.ts +23 -0
- package/dist/packages/extension-superscript/src/index.d.ts +3 -0
- package/dist/packages/extension-superscript/src/superscript.d.ts +23 -0
- package/dist/packages/extension-table/src/TableView.d.ts +17 -0
- package/dist/packages/extension-table/src/index.d.ts +4 -0
- package/dist/packages/extension-table/src/table.d.ts +54 -0
- package/dist/packages/extension-table/src/utilities/createCell.d.ts +2 -0
- package/dist/packages/extension-table/src/utilities/createTable.d.ts +2 -0
- package/dist/packages/extension-table/src/utilities/deleteTableWhenAllCellsSelected.d.ts +2 -0
- package/dist/packages/extension-table/src/utilities/getTableNodeTypes.d.ts +4 -0
- package/dist/packages/extension-table/src/utilities/isCellSelection.d.ts +2 -0
- package/dist/packages/extension-table-cell/src/index.d.ts +3 -0
- package/dist/packages/extension-table-cell/src/table-cell.d.ts +5 -0
- package/dist/packages/extension-table-header/src/index.d.ts +3 -0
- package/dist/packages/extension-table-header/src/table-header.d.ts +5 -0
- package/dist/packages/extension-table-row/src/index.d.ts +3 -0
- package/dist/packages/extension-table-row/src/table-row.d.ts +5 -0
- package/dist/packages/extension-task-item/src/index.d.ts +3 -0
- package/dist/packages/extension-task-item/src/task-item.d.ts +7 -0
- package/dist/packages/extension-task-list/src/index.d.ts +3 -0
- package/dist/packages/extension-task-list/src/task-list.d.ts +15 -0
- package/dist/packages/extension-text/src/index.d.ts +3 -0
- package/dist/packages/extension-text/src/text.d.ts +2 -0
- package/dist/packages/extension-text-align/src/index.d.ts +3 -0
- package/dist/packages/extension-text-align/src/text-align.d.ts +21 -0
- package/dist/packages/extension-text-style/src/index.d.ts +3 -0
- package/dist/packages/extension-text-style/src/text-style.d.ts +15 -0
- package/dist/packages/extension-typography/src/index.d.ts +3 -0
- package/dist/packages/extension-typography/src/typography.d.ts +18 -0
- package/dist/packages/extension-underline/src/index.d.ts +3 -0
- package/dist/packages/extension-underline/src/underline.d.ts +23 -0
- package/dist/packages/html/src/generateHTML.d.ts +2 -0
- package/dist/packages/html/src/generateJSON.d.ts +2 -0
- package/dist/packages/html/src/getHTMLFromFragment.d.ts +2 -0
- package/dist/packages/html/src/index.d.ts +2 -0
- package/dist/packages/react/src/BubbleMenu.d.ts +8 -0
- package/dist/packages/react/src/Editor.d.ts +6 -0
- package/dist/packages/react/src/EditorContent.d.ts +19 -0
- package/dist/packages/react/src/FloatingMenu.d.ts +8 -0
- package/dist/packages/react/src/NodeViewContent.d.ts +6 -0
- package/dist/packages/react/src/NodeViewWrapper.d.ts +6 -0
- package/dist/packages/react/src/ReactNodeViewRenderer.d.ts +13 -0
- package/dist/packages/react/src/ReactRenderer.d.ts +25 -0
- package/dist/packages/react/src/index.d.ts +10 -0
- package/dist/packages/react/src/useEditor.d.ts +4 -0
- package/dist/packages/react/src/useReactNodeView.d.ts +7 -0
- package/dist/packages/suggestion/src/findSuggestionMatch.d.ts +15 -0
- package/dist/packages/suggestion/src/index.d.ts +4 -0
- package/dist/packages/suggestion/src/suggestion.d.ts +46 -0
- package/dist/packages/vue-2/src/BubbleMenu.d.ts +9 -0
- package/dist/packages/vue-2/src/Editor.d.ts +5 -0
- package/dist/packages/vue-2/src/EditorContent.d.ts +6 -0
- package/dist/packages/vue-2/src/FloatingMenu.d.ts +9 -0
- package/dist/packages/vue-2/src/NodeViewContent.d.ts +5 -0
- package/dist/packages/vue-2/src/NodeViewWrapper.d.ts +9 -0
- package/dist/packages/vue-2/src/VueNodeViewRenderer.d.ts +51 -0
- package/dist/packages/vue-2/src/VueRenderer.d.ts +9 -0
- package/dist/packages/vue-2/src/index.d.ts +9 -0
- package/dist/packages/vue-3/src/BubbleMenu.d.ts +56 -0
- package/dist/packages/vue-3/src/Editor.d.ts +22 -0
- package/dist/packages/vue-3/src/EditorContent.d.ts +16 -0
- package/dist/packages/vue-3/src/FloatingMenu.d.ts +50 -0
- package/dist/packages/vue-3/src/NodeViewContent.d.ts +12 -0
- package/dist/packages/vue-3/src/NodeViewWrapper.d.ts +12 -0
- package/dist/packages/vue-3/src/VueNodeViewRenderer.d.ts +50 -0
- package/dist/packages/vue-3/src/VueRenderer.d.ts +19 -0
- package/dist/packages/vue-3/src/index.d.ts +10 -0
- package/dist/packages/vue-3/src/useEditor.d.ts +3 -0
- package/dist/tests/cypress/integration/core/can.spec.d.ts +1 -0
- package/dist/tests/cypress/integration/core/editorProps.spec.d.ts +1 -0
- package/dist/tests/cypress/integration/core/extendExtensions.spec.d.ts +1 -0
- package/dist/tests/cypress/integration/core/extendMarkRange.spec.d.ts +1 -0
- package/dist/tests/cypress/integration/core/extensionOptions.spec.d.ts +1 -0
- package/dist/tests/cypress/integration/core/fromString.spec.d.ts +1 -0
- package/dist/tests/cypress/integration/core/generateHTML.spec.d.ts +1 -0
- package/dist/tests/cypress/integration/core/generateJSON.spec.d.ts +1 -0
- package/dist/tests/cypress/integration/core/isActive.spec.d.ts +1 -0
- package/dist/tests/cypress/integration/core/isClass.spec.d.ts +1 -0
- package/dist/tests/cypress/integration/core/mergeAttributes.spec.d.ts +1 -0
- package/dist/tests/cypress/integration/core/mergeDeep.spec.d.ts +1 -0
- package/dist/tests/cypress/integration/extensions/bold.spec.d.ts +1 -0
- package/dist/tests/cypress/integration/extensions/link.spec.d.ts +1 -0
- package/dist/tests/cypress/integration/html/generateHTML.spec.d.ts +1 -0
- package/dist/tests/cypress/integration/html/generateJSON.spec.d.ts +1 -0
- package/package.json +3 -3
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { Range, TextSerializer } from '../types';
|
|
2
|
+
import { Node as ProseMirrorNode } from 'prosemirror-model';
|
|
3
|
+
export default function getTextBetween(startNode: ProseMirrorNode, range: Range, options?: {
|
|
4
|
+
blockSeparator?: string;
|
|
5
|
+
textSerializers?: Record<string, TextSerializer>;
|
|
6
|
+
}): string;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { ParseRule } from 'prosemirror-model';
|
|
2
|
+
import { ExtensionAttribute } from '../types';
|
|
3
|
+
/**
|
|
4
|
+
* This function merges extension attributes into parserule attributes (`attrs` or `getAttrs`).
|
|
5
|
+
* Cancels when `getAttrs` returned `false`.
|
|
6
|
+
* @param parseRule ProseMirror ParseRule
|
|
7
|
+
* @param extensionAttributes List of attributes to inject
|
|
8
|
+
*/
|
|
9
|
+
export default function injectExtensionAttributesToParseRule(parseRule: ParseRule, extensionAttributes: ExtensionAttribute[]): ParseRule;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Extensions } from '../types';
|
|
2
|
+
import { Extension } from '../Extension';
|
|
3
|
+
import { Node } from '../Node';
|
|
4
|
+
import { Mark } from '../Mark';
|
|
5
|
+
export default function splitExtensions(extensions: Extensions): {
|
|
6
|
+
baseExtensions: Extension<any>[];
|
|
7
|
+
nodeExtensions: Node<any>[];
|
|
8
|
+
markExtensions: Mark<any>[];
|
|
9
|
+
};
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
export * from './Editor';
|
|
2
|
+
export * from './Extension';
|
|
3
|
+
export * from './Node';
|
|
4
|
+
export * from './Mark';
|
|
5
|
+
export * from './NodeView';
|
|
6
|
+
export * from './Tracker';
|
|
7
|
+
export * from './types';
|
|
8
|
+
export { default as nodeInputRule } from './inputRules/nodeInputRule';
|
|
9
|
+
export { default as markInputRule } from './inputRules/markInputRule';
|
|
10
|
+
export { default as markPasteRule } from './pasteRules/markPasteRule';
|
|
11
|
+
export { default as callOrReturn } from './utilities/callOrReturn';
|
|
12
|
+
export { default as mergeAttributes } from './utilities/mergeAttributes';
|
|
13
|
+
export { default as getExtensionField } from './helpers/getExtensionField';
|
|
14
|
+
export { default as findChildren } from './helpers/findChildren';
|
|
15
|
+
export { default as findChildrenInRange } from './helpers/findChildrenInRange';
|
|
16
|
+
export { default as findParentNode } from './helpers/findParentNode';
|
|
17
|
+
export { default as findParentNodeClosestToPos } from './helpers/findParentNodeClosestToPos';
|
|
18
|
+
export { default as generateHTML } from './helpers/generateHTML';
|
|
19
|
+
export { default as generateJSON } from './helpers/generateJSON';
|
|
20
|
+
export { default as generateText } from './helpers/generateText';
|
|
21
|
+
export { default as getSchema } from './helpers/getSchema';
|
|
22
|
+
export { default as getHTMLFromFragment } from './helpers/getHTMLFromFragment';
|
|
23
|
+
export { default as getDebugJSON } from './helpers/getDebugJSON';
|
|
24
|
+
export { default as getAttributes } from './helpers/getAttributes';
|
|
25
|
+
export { default as getMarkAttributes } from './helpers/getMarkAttributes';
|
|
26
|
+
export { default as getMarkRange } from './helpers/getMarkRange';
|
|
27
|
+
export { default as getMarkType } from './helpers/getMarkType';
|
|
28
|
+
export { default as getMarksBetween } from './helpers/getMarksBetween';
|
|
29
|
+
export { default as getNodeAttributes } from './helpers/getNodeAttributes';
|
|
30
|
+
export { default as getNodeType } from './helpers/getNodeType';
|
|
31
|
+
export { default as getText } from './helpers/getText';
|
|
32
|
+
export { default as getTextBetween } from './helpers/getTextBetween';
|
|
33
|
+
export { default as isActive } from './helpers/isActive';
|
|
34
|
+
export { default as isList } from './helpers/isList';
|
|
35
|
+
export { default as isMarkActive } from './helpers/isMarkActive';
|
|
36
|
+
export { default as isNodeActive } from './helpers/isNodeActive';
|
|
37
|
+
export { default as isNodeEmpty } from './helpers/isNodeEmpty';
|
|
38
|
+
export { default as isNodeSelection } from './helpers/isNodeSelection';
|
|
39
|
+
export { default as isTextSelection } from './helpers/isTextSelection';
|
|
40
|
+
export { default as posToDOMRect } from './helpers/posToDOMRect';
|
|
41
|
+
export interface Commands<ReturnType = any> {
|
|
42
|
+
}
|
|
43
|
+
export interface ExtensionConfig<Options = any> {
|
|
44
|
+
}
|
|
45
|
+
export interface NodeConfig<Options = any> {
|
|
46
|
+
}
|
|
47
|
+
export interface MarkConfig<Options = any> {
|
|
48
|
+
}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
declare const style = ".ProseMirror {\n position: relative;\n}\n\n.ProseMirror {\n word-wrap: break-word;\n white-space: pre-wrap;\n white-space: break-spaces;\n -webkit-font-variant-ligatures: none;\n font-variant-ligatures: none;\n font-feature-settings: \"liga\" 0; /* the above doesn't seem to work in Edge */\n}\n\n.ProseMirror [contenteditable=\"false\"] {\n white-space: normal;\n}\n\n.ProseMirror [contenteditable=\"false\"] [contenteditable=\"true\"] {\n white-space: pre-wrap;\n}\n\n.ProseMirror pre {\n white-space: pre-wrap;\n}\n\nimg.ProseMirror-separator {\n display: inline !important;\n border: none !important;\n margin: 0 !important;\n}\n\n.ProseMirror-gapcursor {\n display: none;\n pointer-events: none;\n position: absolute;\n}\n\n.ProseMirror-gapcursor:after {\n content: \"\";\n display: block;\n position: absolute;\n top: -2px;\n width: 20px;\n border-top: 1px solid black;\n animation: ProseMirror-cursor-blink 1.1s steps(2, start) infinite;\n}\n\n@keyframes ProseMirror-cursor-blink {\n to {\n visibility: hidden;\n }\n}\n\n.ProseMirror-hideselection *::selection {\n background: transparent;\n}\n\n.ProseMirror-hideselection *::-moz-selection {\n background: transparent;\n}\n\n.ProseMirror-hideselection * {\n caret-color: transparent;\n}\n\n.ProseMirror-focused .ProseMirror-gapcursor {\n display: block;\n}\n\n.tippy-box[data-animation=fade][data-state=hidden] {\n opacity: 0\n}";
|
|
2
|
+
export default style;
|
|
@@ -0,0 +1,193 @@
|
|
|
1
|
+
import { Node as ProseMirrorNode, Mark as ProseMirrorMark, ParseOptions } from 'prosemirror-model';
|
|
2
|
+
import { EditorView, Decoration, NodeView, EditorProps } from 'prosemirror-view';
|
|
3
|
+
import { EditorState, Transaction } from 'prosemirror-state';
|
|
4
|
+
import { Extension } from './Extension';
|
|
5
|
+
import { Node } from './Node';
|
|
6
|
+
import { Mark } from './Mark';
|
|
7
|
+
import { Editor } from './Editor';
|
|
8
|
+
import { Commands, ExtensionConfig, NodeConfig, MarkConfig } from '.';
|
|
9
|
+
export declare type AnyConfig = ExtensionConfig | NodeConfig | MarkConfig;
|
|
10
|
+
export declare type AnyExtension = Extension | Node | Mark;
|
|
11
|
+
export declare type Extensions = AnyExtension[];
|
|
12
|
+
export declare type ParentConfig<T> = Partial<{
|
|
13
|
+
[P in keyof T]: Required<T>[P] extends (...args: any) => any ? (...args: Parameters<Required<T>[P]>) => ReturnType<Required<T>[P]> : T[P];
|
|
14
|
+
}>;
|
|
15
|
+
export declare type RemoveThis<T> = T extends (...args: any) => any ? (...args: Parameters<T>) => ReturnType<T> : T;
|
|
16
|
+
export declare type MaybeReturnType<T> = T extends (...args: any) => any ? ReturnType<T> : T;
|
|
17
|
+
export interface EditorOptions {
|
|
18
|
+
element: Element;
|
|
19
|
+
content: Content;
|
|
20
|
+
extensions: Extensions;
|
|
21
|
+
injectCSS: boolean;
|
|
22
|
+
autofocus: FocusPosition;
|
|
23
|
+
editable: boolean;
|
|
24
|
+
editorProps: EditorProps;
|
|
25
|
+
parseOptions: ParseOptions;
|
|
26
|
+
enableInputRules: boolean;
|
|
27
|
+
enablePasteRules: boolean;
|
|
28
|
+
onBeforeCreate: (props: {
|
|
29
|
+
editor: Editor;
|
|
30
|
+
}) => void;
|
|
31
|
+
onCreate: (props: {
|
|
32
|
+
editor: Editor;
|
|
33
|
+
}) => void;
|
|
34
|
+
onUpdate: (props: {
|
|
35
|
+
editor: Editor;
|
|
36
|
+
transaction: Transaction;
|
|
37
|
+
}) => void;
|
|
38
|
+
onSelectionUpdate: (props: {
|
|
39
|
+
editor: Editor;
|
|
40
|
+
transaction: Transaction;
|
|
41
|
+
}) => void;
|
|
42
|
+
onTransaction: (props: {
|
|
43
|
+
editor: Editor;
|
|
44
|
+
transaction: Transaction;
|
|
45
|
+
}) => void;
|
|
46
|
+
onFocus: (props: {
|
|
47
|
+
editor: Editor;
|
|
48
|
+
event: FocusEvent;
|
|
49
|
+
transaction: Transaction;
|
|
50
|
+
}) => void;
|
|
51
|
+
onBlur: (props: {
|
|
52
|
+
editor: Editor;
|
|
53
|
+
event: FocusEvent;
|
|
54
|
+
transaction: Transaction;
|
|
55
|
+
}) => void;
|
|
56
|
+
onDestroy: () => void;
|
|
57
|
+
}
|
|
58
|
+
export declare type HTMLContent = string;
|
|
59
|
+
export declare type JSONContent = {
|
|
60
|
+
type: string;
|
|
61
|
+
attrs?: Record<string, any>;
|
|
62
|
+
content?: JSONContent[];
|
|
63
|
+
marks?: {
|
|
64
|
+
type: string;
|
|
65
|
+
attrs?: Record<string, any>;
|
|
66
|
+
[key: string]: any;
|
|
67
|
+
}[];
|
|
68
|
+
text?: string;
|
|
69
|
+
[key: string]: any;
|
|
70
|
+
};
|
|
71
|
+
export declare type Content = HTMLContent | JSONContent | JSONContent[] | null;
|
|
72
|
+
export declare type CommandProps = {
|
|
73
|
+
editor: Editor;
|
|
74
|
+
tr: Transaction;
|
|
75
|
+
commands: SingleCommands;
|
|
76
|
+
can: () => CanCommands;
|
|
77
|
+
chain: () => ChainedCommands;
|
|
78
|
+
state: EditorState;
|
|
79
|
+
view: EditorView;
|
|
80
|
+
dispatch: ((args?: any) => any) | undefined;
|
|
81
|
+
};
|
|
82
|
+
export declare type Command = (props: CommandProps) => boolean;
|
|
83
|
+
export declare type CommandSpec = (...args: any[]) => Command;
|
|
84
|
+
export declare type KeyboardShortcutCommand = (props: {
|
|
85
|
+
editor: Editor;
|
|
86
|
+
}) => boolean;
|
|
87
|
+
export declare type Attribute = {
|
|
88
|
+
default: any;
|
|
89
|
+
rendered?: boolean;
|
|
90
|
+
renderHTML?: ((attributes: Record<string, any>) => Record<string, any> | null) | null;
|
|
91
|
+
parseHTML?: ((element: HTMLElement) => any | null) | null;
|
|
92
|
+
keepOnSplit: boolean;
|
|
93
|
+
};
|
|
94
|
+
export declare type Attributes = {
|
|
95
|
+
[key: string]: Attribute;
|
|
96
|
+
};
|
|
97
|
+
export declare type ExtensionAttribute = {
|
|
98
|
+
type: string;
|
|
99
|
+
name: string;
|
|
100
|
+
attribute: Required<Attribute>;
|
|
101
|
+
};
|
|
102
|
+
export declare type GlobalAttributes = {
|
|
103
|
+
types: string[];
|
|
104
|
+
attributes: {
|
|
105
|
+
[key: string]: Attribute;
|
|
106
|
+
};
|
|
107
|
+
}[];
|
|
108
|
+
export declare type PickValue<T, K extends keyof T> = T[K];
|
|
109
|
+
export declare type UnionToIntersection<U> = (U extends any ? (k: U) => void : never) extends ((k: infer I) => void) ? I : never;
|
|
110
|
+
export declare type Diff<T extends keyof any, U extends keyof any> = ({
|
|
111
|
+
[P in T]: P;
|
|
112
|
+
} & {
|
|
113
|
+
[P in U]: never;
|
|
114
|
+
} & {
|
|
115
|
+
[x: string]: never;
|
|
116
|
+
})[T];
|
|
117
|
+
export declare type Overwrite<T, U> = Pick<T, Diff<keyof T, keyof U>> & U;
|
|
118
|
+
export declare type ValuesOf<T> = T[keyof T];
|
|
119
|
+
export declare type KeysWithTypeOf<T, Type> = ({
|
|
120
|
+
[P in keyof T]: T[P] extends Type ? P : never;
|
|
121
|
+
})[keyof T];
|
|
122
|
+
export declare type NodeViewProps = {
|
|
123
|
+
editor: Editor;
|
|
124
|
+
node: ProseMirrorNode;
|
|
125
|
+
decorations: Decoration[];
|
|
126
|
+
selected: boolean;
|
|
127
|
+
extension: Node;
|
|
128
|
+
getPos: () => number;
|
|
129
|
+
updateAttributes: (attributes: Record<string, any>) => void;
|
|
130
|
+
deleteNode: () => void;
|
|
131
|
+
};
|
|
132
|
+
export interface NodeViewRendererOptions {
|
|
133
|
+
stopEvent: ((props: {
|
|
134
|
+
event: Event;
|
|
135
|
+
}) => boolean) | null;
|
|
136
|
+
ignoreMutation: ((props: {
|
|
137
|
+
mutation: MutationRecord | {
|
|
138
|
+
type: 'selection';
|
|
139
|
+
target: Element;
|
|
140
|
+
};
|
|
141
|
+
}) => boolean) | null;
|
|
142
|
+
}
|
|
143
|
+
export declare type NodeViewRendererProps = {
|
|
144
|
+
editor: Editor;
|
|
145
|
+
node: ProseMirrorNode;
|
|
146
|
+
getPos: (() => number) | boolean;
|
|
147
|
+
HTMLAttributes: Record<string, any>;
|
|
148
|
+
decorations: Decoration[];
|
|
149
|
+
extension: Node;
|
|
150
|
+
};
|
|
151
|
+
export declare type NodeViewRenderer = (props: NodeViewRendererProps) => (NodeView | {});
|
|
152
|
+
export declare type AnyCommands = Record<string, (...args: any[]) => Command>;
|
|
153
|
+
export declare type UnionCommands<T = Command> = UnionToIntersection<ValuesOf<Pick<Commands<T>, KeysWithTypeOf<Commands<T>, {}>>>>;
|
|
154
|
+
export declare type RawCommands = {
|
|
155
|
+
[Item in keyof UnionCommands]: UnionCommands<Command>[Item];
|
|
156
|
+
};
|
|
157
|
+
export declare type SingleCommands = {
|
|
158
|
+
[Item in keyof UnionCommands]: UnionCommands<boolean>[Item];
|
|
159
|
+
};
|
|
160
|
+
export declare type ChainedCommands = {
|
|
161
|
+
[Item in keyof UnionCommands]: UnionCommands<ChainedCommands>[Item];
|
|
162
|
+
} & {
|
|
163
|
+
run: () => boolean;
|
|
164
|
+
};
|
|
165
|
+
export declare type CanCommands = SingleCommands & {
|
|
166
|
+
chain: () => ChainedCommands;
|
|
167
|
+
};
|
|
168
|
+
export declare type FocusPosition = 'start' | 'end' | number | boolean | null;
|
|
169
|
+
export declare type Range = {
|
|
170
|
+
from: number;
|
|
171
|
+
to: number;
|
|
172
|
+
};
|
|
173
|
+
export declare type NodeRange = {
|
|
174
|
+
node: ProseMirrorNode;
|
|
175
|
+
from: number;
|
|
176
|
+
to: number;
|
|
177
|
+
};
|
|
178
|
+
export declare type MarkRange = {
|
|
179
|
+
mark: ProseMirrorMark;
|
|
180
|
+
from: number;
|
|
181
|
+
to: number;
|
|
182
|
+
};
|
|
183
|
+
export declare type Predicate = (node: ProseMirrorNode) => boolean;
|
|
184
|
+
export declare type NodeWithPos = {
|
|
185
|
+
node: ProseMirrorNode;
|
|
186
|
+
pos: number;
|
|
187
|
+
};
|
|
188
|
+
export declare type TextSerializer = (props: {
|
|
189
|
+
node: ProseMirrorNode;
|
|
190
|
+
pos: number;
|
|
191
|
+
parent: ProseMirrorNode;
|
|
192
|
+
index: number;
|
|
193
|
+
}) => string;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { MaybeReturnType } from '../types';
|
|
2
|
+
/**
|
|
3
|
+
* Optionally calls `value` as a function.
|
|
4
|
+
* Otherwise it is returned directly.
|
|
5
|
+
* @param value Function or any value.
|
|
6
|
+
* @param context Optional context to bind to function.
|
|
7
|
+
* @param props Optional props to pass to function.
|
|
8
|
+
*/
|
|
9
|
+
export default function callOrReturn<T>(value: T, context?: any, ...props: any[]): MaybeReturnType<T>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function createStyleTag(style: string): HTMLStyleElement;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function elementFromString(value: string): HTMLElement;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function fromString(value: any): any;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function isClass(item: any): boolean;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function isEmptyObject(object?: {}): boolean;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function isObject(item: any): boolean;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function isPlainObject(payload: any): payload is Record<string, any>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function isRegExp(value: any): boolean;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function isiOS(): boolean;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function mergeAttributes(...objects: Record<string, any>[]): Record<string, any>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function mergeDeep(target: Record<string, any>, source: Record<string, any>): Record<string, any>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function minMax(value?: number, min?: number, max?: number): number;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function removeElement(element: HTMLElement): void;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { Node } from '@tiptap/core';
|
|
2
|
+
export interface BlockquoteOptions {
|
|
3
|
+
HTMLAttributes: Record<string, any>;
|
|
4
|
+
}
|
|
5
|
+
declare module '@tiptap/core' {
|
|
6
|
+
interface Commands<ReturnType> {
|
|
7
|
+
blockQuote: {
|
|
8
|
+
/**
|
|
9
|
+
* Set a blockquote node
|
|
10
|
+
*/
|
|
11
|
+
setBlockquote: () => ReturnType;
|
|
12
|
+
/**
|
|
13
|
+
* Toggle a blockquote node
|
|
14
|
+
*/
|
|
15
|
+
toggleBlockquote: () => ReturnType;
|
|
16
|
+
/**
|
|
17
|
+
* Unset a blockquote node
|
|
18
|
+
*/
|
|
19
|
+
unsetBlockquote: () => ReturnType;
|
|
20
|
+
};
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
export declare const inputRegex: RegExp;
|
|
24
|
+
export declare const Blockquote: Node<BlockquoteOptions>;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { Mark } from '@tiptap/core';
|
|
2
|
+
export interface BoldOptions {
|
|
3
|
+
HTMLAttributes: Record<string, any>;
|
|
4
|
+
}
|
|
5
|
+
declare module '@tiptap/core' {
|
|
6
|
+
interface Commands<ReturnType> {
|
|
7
|
+
bold: {
|
|
8
|
+
/**
|
|
9
|
+
* Set a bold mark
|
|
10
|
+
*/
|
|
11
|
+
setBold: () => ReturnType;
|
|
12
|
+
/**
|
|
13
|
+
* Toggle a bold mark
|
|
14
|
+
*/
|
|
15
|
+
toggleBold: () => ReturnType;
|
|
16
|
+
/**
|
|
17
|
+
* Unset a bold mark
|
|
18
|
+
*/
|
|
19
|
+
unsetBold: () => ReturnType;
|
|
20
|
+
};
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
export declare const starInputRegex: RegExp;
|
|
24
|
+
export declare const starPasteRegex: RegExp;
|
|
25
|
+
export declare const underscoreInputRegex: RegExp;
|
|
26
|
+
export declare const underscorePasteRegex: RegExp;
|
|
27
|
+
export declare const Bold: Mark<BoldOptions>;
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { Editor } from '@tiptap/core';
|
|
2
|
+
import { EditorState, Plugin, PluginKey } from 'prosemirror-state';
|
|
3
|
+
import { EditorView } from 'prosemirror-view';
|
|
4
|
+
import { Instance, Props } from 'tippy.js';
|
|
5
|
+
export interface BubbleMenuPluginProps {
|
|
6
|
+
pluginKey: PluginKey | string;
|
|
7
|
+
editor: Editor;
|
|
8
|
+
element: HTMLElement;
|
|
9
|
+
tippyOptions?: Partial<Props>;
|
|
10
|
+
shouldShow?: ((props: {
|
|
11
|
+
editor: Editor;
|
|
12
|
+
view: EditorView;
|
|
13
|
+
state: EditorState;
|
|
14
|
+
oldState?: EditorState;
|
|
15
|
+
from: number;
|
|
16
|
+
to: number;
|
|
17
|
+
}) => boolean) | null;
|
|
18
|
+
}
|
|
19
|
+
export declare type BubbleMenuViewProps = BubbleMenuPluginProps & {
|
|
20
|
+
view: EditorView;
|
|
21
|
+
};
|
|
22
|
+
export declare class BubbleMenuView {
|
|
23
|
+
editor: Editor;
|
|
24
|
+
element: HTMLElement;
|
|
25
|
+
view: EditorView;
|
|
26
|
+
preventHide: boolean;
|
|
27
|
+
tippy: Instance | undefined;
|
|
28
|
+
tippyOptions?: Partial<Props>;
|
|
29
|
+
shouldShow: Exclude<BubbleMenuPluginProps['shouldShow'], null>;
|
|
30
|
+
constructor({ editor, element, view, tippyOptions, shouldShow, }: BubbleMenuViewProps);
|
|
31
|
+
mousedownHandler: () => void;
|
|
32
|
+
dragstartHandler: () => void;
|
|
33
|
+
focusHandler: () => void;
|
|
34
|
+
blurHandler: ({ event }: {
|
|
35
|
+
event: FocusEvent;
|
|
36
|
+
}) => void;
|
|
37
|
+
createTooltip(): void;
|
|
38
|
+
update(view: EditorView, oldState?: EditorState): void;
|
|
39
|
+
show(): void;
|
|
40
|
+
hide(): void;
|
|
41
|
+
destroy(): void;
|
|
42
|
+
}
|
|
43
|
+
export declare const BubbleMenuPlugin: (options: BubbleMenuPluginProps) => Plugin<any, any>;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { Extension } from '@tiptap/core';
|
|
2
|
+
import { BubbleMenuPluginProps } from './bubble-menu-plugin';
|
|
3
|
+
export declare type BubbleMenuOptions = Omit<BubbleMenuPluginProps, 'editor' | 'element'> & {
|
|
4
|
+
element: HTMLElement | null;
|
|
5
|
+
};
|
|
6
|
+
export declare const BubbleMenu: Extension<BubbleMenuOptions>;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { Node } from '@tiptap/core';
|
|
2
|
+
export interface BulletListOptions {
|
|
3
|
+
HTMLAttributes: Record<string, any>;
|
|
4
|
+
}
|
|
5
|
+
declare module '@tiptap/core' {
|
|
6
|
+
interface Commands<ReturnType> {
|
|
7
|
+
bulletList: {
|
|
8
|
+
/**
|
|
9
|
+
* Toggle a bullet list
|
|
10
|
+
*/
|
|
11
|
+
toggleBulletList: () => ReturnType;
|
|
12
|
+
};
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
export declare const inputRegex: RegExp;
|
|
16
|
+
export declare const BulletList: Node<BulletListOptions>;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { Extension } from '@tiptap/core';
|
|
2
|
+
import { PluginKey } from 'prosemirror-state';
|
|
3
|
+
export declare const pluginKey: PluginKey<any, any>;
|
|
4
|
+
export interface CharacterCountOptions {
|
|
5
|
+
limit?: number;
|
|
6
|
+
}
|
|
7
|
+
export declare const CharacterCount: Extension<CharacterCountOptions>;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { Mark } from '@tiptap/core';
|
|
2
|
+
export interface CodeOptions {
|
|
3
|
+
HTMLAttributes: Record<string, any>;
|
|
4
|
+
}
|
|
5
|
+
declare module '@tiptap/core' {
|
|
6
|
+
interface Commands<ReturnType> {
|
|
7
|
+
code: {
|
|
8
|
+
/**
|
|
9
|
+
* Set a code mark
|
|
10
|
+
*/
|
|
11
|
+
setCode: () => ReturnType;
|
|
12
|
+
/**
|
|
13
|
+
* Toggle inline code
|
|
14
|
+
*/
|
|
15
|
+
toggleCode: () => ReturnType;
|
|
16
|
+
/**
|
|
17
|
+
* Unset a code mark
|
|
18
|
+
*/
|
|
19
|
+
unsetCode: () => ReturnType;
|
|
20
|
+
};
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
export declare const inputRegex: RegExp;
|
|
24
|
+
export declare const pasteRegex: RegExp;
|
|
25
|
+
export declare const Code: Mark<CodeOptions>;
|