@tiptap/core 2.0.0-beta.176 → 2.0.0-beta.179
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/packages/core/src/CommandManager.d.ts +1 -1
- package/dist/packages/core/src/Editor.d.ts +3 -3
- package/dist/packages/core/src/Extension.d.ts +5 -5
- package/dist/packages/core/src/InputRule.d.ts +1 -1
- package/dist/packages/core/src/Mark.d.ts +5 -5
- package/dist/packages/core/src/Node.d.ts +4 -4
- package/dist/packages/core/src/NodeView.d.ts +2 -2
- package/dist/packages/core/src/PasteRule.d.ts +1 -1
- package/dist/packages/core/src/commands/deleteRange.d.ts +1 -1
- package/dist/packages/core/src/commands/focus.d.ts +1 -1
- package/dist/packages/core/src/commands/index.d.ts +50 -0
- package/dist/packages/core/src/commands/insertContent.d.ts +1 -1
- package/dist/packages/core/src/commands/insertContentAt.d.ts +1 -1
- package/dist/packages/core/src/commands/resetAttributes.d.ts +1 -1
- package/dist/packages/core/src/commands/setContent.d.ts +1 -1
- package/dist/packages/core/src/commands/setTextSelection.d.ts +1 -1
- package/dist/packages/core/src/commands/updateAttributes.d.ts +1 -1
- package/dist/packages/core/src/extensions/commands.d.ts +1 -100
- package/dist/packages/core/src/helpers/createDocument.d.ts +1 -1
- package/dist/packages/core/src/helpers/createNodeFromContent.d.ts +1 -1
- package/dist/packages/core/src/helpers/findChildren.d.ts +1 -1
- package/dist/packages/core/src/helpers/findChildrenInRange.d.ts +1 -1
- package/dist/packages/core/src/helpers/findParentNodeClosestToPos.d.ts +1 -1
- package/dist/packages/core/src/helpers/getAttributesFromExtensions.d.ts +1 -1
- package/dist/packages/core/src/helpers/getExtensionField.d.ts +1 -1
- package/dist/packages/core/src/helpers/getHTMLFromFragment.d.ts +1 -1
- package/dist/packages/core/src/helpers/getMarkAttributes.d.ts +1 -1
- package/dist/packages/core/src/helpers/getNodeAttributes.d.ts +1 -1
- package/dist/packages/core/src/helpers/getRenderedAttributes.d.ts +1 -1
- package/dist/packages/core/src/helpers/getText.d.ts +1 -1
- package/dist/packages/core/src/helpers/getTextBetween.d.ts +1 -1
- package/dist/packages/core/src/helpers/getTextContentFromNodes.d.ts +2 -0
- package/dist/packages/core/src/helpers/index.d.ts +33 -0
- package/dist/packages/core/src/helpers/isMarkActive.d.ts +1 -1
- package/dist/packages/core/src/helpers/isNodeActive.d.ts +1 -1
- package/dist/packages/core/src/helpers/splitExtensions.d.ts +2 -2
- package/dist/packages/core/src/index.d.ts +9 -48
- package/dist/packages/core/src/inputRules/index.d.ts +5 -0
- package/dist/packages/core/src/inputRules/markInputRule.d.ts +1 -1
- package/dist/packages/core/src/inputRules/textblockTypeInputRule.d.ts +1 -1
- package/dist/packages/core/src/inputRules/wrappingInputRule.d.ts +1 -1
- package/dist/packages/core/src/pasteRules/index.d.ts +2 -0
- package/dist/packages/core/src/pasteRules/markPasteRule.d.ts +1 -1
- package/dist/packages/core/src/types.d.ts +6 -5
- package/dist/packages/core/src/utilities/index.d.ts +3 -0
- package/dist/tiptap-core.cjs.js +3477 -3706
- package/dist/tiptap-core.cjs.js.map +1 -1
- package/dist/tiptap-core.esm.js +3467 -3697
- package/dist/tiptap-core.esm.js.map +1 -1
- package/dist/tiptap-core.umd.js +3466 -3695
- package/dist/tiptap-core.umd.js.map +1 -1
- package/package.json +2 -2
- package/src/CommandManager.ts +4 -3
- package/src/Editor.ts +14 -13
- package/src/Extension.ts +10 -9
- package/src/ExtensionManager.ts +11 -10
- package/src/InputRule.ts +9 -12
- package/src/Mark.ts +11 -10
- package/src/Node.ts +11 -10
- package/src/NodeView.ts +4 -3
- package/src/PasteRule.ts +7 -6
- package/src/commands/clearNodes.ts +1 -0
- package/src/commands/createParagraphNear.ts +1 -0
- package/src/commands/deleteNode.ts +1 -0
- package/src/commands/deleteRange.ts +1 -1
- package/src/commands/deleteSelection.ts +1 -0
- package/src/commands/exitCode.ts +1 -0
- package/src/commands/extendMarkRange.ts +4 -3
- package/src/commands/focus.ts +3 -3
- package/src/commands/index.ts +50 -0
- package/src/commands/insertContent.ts +2 -1
- package/src/commands/insertContentAt.ts +2 -1
- package/src/commands/joinBackward.ts +1 -0
- package/src/commands/joinForward.ts +1 -0
- package/src/commands/lift.ts +3 -2
- package/src/commands/liftEmptyBlock.ts +1 -0
- package/src/commands/liftListItem.ts +3 -2
- package/src/commands/newlineInCode.ts +1 -0
- package/src/commands/resetAttributes.ts +4 -3
- package/src/commands/selectNodeBackward.ts +1 -0
- package/src/commands/selectNodeForward.ts +1 -0
- package/src/commands/selectParentNode.ts +1 -0
- package/src/commands/selectTextblockEnd.ts +1 -0
- package/src/commands/selectTextblockStart.ts +1 -0
- package/src/commands/setContent.ts +3 -2
- package/src/commands/setMark.ts +3 -2
- package/src/commands/setNode.ts +3 -2
- package/src/commands/setNodeSelection.ts +3 -2
- package/src/commands/setTextSelection.ts +2 -1
- package/src/commands/sinkListItem.ts +3 -2
- package/src/commands/splitBlock.ts +3 -2
- package/src/commands/splitListItem.ts +5 -4
- package/src/commands/toggleList.ts +3 -2
- package/src/commands/toggleMark.ts +2 -1
- package/src/commands/toggleNode.ts +3 -2
- package/src/commands/toggleWrap.ts +3 -2
- package/src/commands/unsetMark.ts +3 -2
- package/src/commands/updateAttributes.ts +3 -2
- package/src/commands/wrapIn.ts +2 -1
- package/src/commands/wrapInList.ts +3 -2
- package/src/extensions/clipboardTextSerializer.ts +1 -0
- package/src/extensions/commands.ts +3 -150
- package/src/extensions/editable.ts +1 -0
- package/src/extensions/focusEvents.ts +1 -0
- package/src/extensions/keymap.ts +3 -2
- package/src/extensions/tabindex.ts +1 -0
- package/src/helpers/createDocument.ts +2 -1
- package/src/helpers/createNodeFromContent.ts +4 -3
- package/src/helpers/findChildren.ts +2 -1
- package/src/helpers/findChildrenInRange.ts +2 -1
- package/src/helpers/findParentNode.ts +2 -1
- package/src/helpers/findParentNodeClosestToPos.ts +2 -1
- package/src/helpers/generateHTML.ts +3 -2
- package/src/helpers/generateJSON.ts +3 -2
- package/src/helpers/generateText.ts +3 -2
- package/src/helpers/getAttributes.ts +3 -2
- package/src/helpers/getAttributesFromExtensions.ts +18 -11
- package/src/helpers/getChangedRanges.ts +2 -1
- package/src/helpers/getDebugJSON.ts +1 -0
- package/src/helpers/getExtensionField.ts +1 -1
- package/src/helpers/getHTMLFromFragment.ts +1 -1
- package/src/helpers/getMarkAttributes.ts +2 -1
- package/src/helpers/getMarkRange.ts +2 -1
- package/src/helpers/getMarksBetween.ts +1 -0
- package/src/helpers/getNodeAttributes.ts +2 -1
- package/src/helpers/getRenderedAttributes.ts +2 -1
- package/src/helpers/getSchema.ts +2 -1
- package/src/helpers/getSchemaByResolvedExtensions.ts +7 -6
- package/src/helpers/getText.ts +2 -1
- package/src/helpers/getTextBetween.ts +3 -2
- package/src/helpers/getTextContentFromNodes.ts +17 -0
- package/src/helpers/getTextSerializersFromSchema.ts +1 -0
- package/src/helpers/index.ts +33 -0
- package/src/helpers/injectExtensionAttributesToParseRule.ts +1 -0
- package/src/helpers/isActive.ts +3 -2
- package/src/helpers/isList.ts +3 -3
- package/src/helpers/isMarkActive.ts +3 -2
- package/src/helpers/isNodeActive.ts +3 -2
- package/src/helpers/isNodeSelection.ts +1 -0
- package/src/helpers/isTextSelection.ts +1 -0
- package/src/helpers/posToDOMRect.ts +1 -0
- package/src/helpers/resolveFocusPosition.ts +1 -0
- package/src/helpers/selectionToInsertionEnd.ts +1 -1
- package/src/helpers/splitExtensions.ts +2 -2
- package/src/index.ts +9 -52
- package/src/inputRules/index.ts +5 -0
- package/src/inputRules/markInputRule.ts +3 -2
- package/src/inputRules/nodeInputRule.ts +1 -0
- package/src/inputRules/textblockTypeInputRule.ts +2 -1
- package/src/inputRules/wrappingInputRule.ts +3 -2
- package/src/pasteRules/index.ts +2 -0
- package/src/pasteRules/markPasteRule.ts +3 -2
- package/src/types.ts +11 -9
- package/src/utilities/index.ts +3 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { EditorState, Transaction } from 'prosemirror-state';
|
|
2
2
|
import { Editor } from './Editor';
|
|
3
|
-
import {
|
|
3
|
+
import { AnyCommands, CanCommands, ChainedCommands, CommandProps, SingleCommands } from './types';
|
|
4
4
|
export declare class CommandManager {
|
|
5
5
|
editor: Editor;
|
|
6
6
|
rawCommands: AnyCommands;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
+
import { MarkType, NodeType, Schema } from 'prosemirror-model';
|
|
1
2
|
import { EditorState, Plugin, PluginKey, Transaction } from 'prosemirror-state';
|
|
2
3
|
import { EditorView } from 'prosemirror-view';
|
|
3
|
-
import { Schema, MarkType, NodeType } from 'prosemirror-model';
|
|
4
|
-
import { ExtensionManager } from './ExtensionManager';
|
|
5
4
|
import { EventEmitter } from './EventEmitter';
|
|
6
|
-
import {
|
|
5
|
+
import { ExtensionManager } from './ExtensionManager';
|
|
7
6
|
import * as extensions from './extensions';
|
|
7
|
+
import { CanCommands, ChainedCommands, EditorEvents, EditorOptions, JSONContent, SingleCommands, TextSerializer } from './types';
|
|
8
8
|
export { extensions };
|
|
9
9
|
export interface HTMLElement {
|
|
10
10
|
editor?: Editor;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { Plugin, Transaction } from 'prosemirror-state';
|
|
2
|
-
import {
|
|
3
|
-
import { PasteRule } from './PasteRule';
|
|
2
|
+
import { ExtensionConfig } from '.';
|
|
4
3
|
import { Editor } from './Editor';
|
|
5
|
-
import {
|
|
4
|
+
import { InputRule } from './InputRule';
|
|
6
5
|
import { Mark } from './Mark';
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
6
|
+
import { Node } from './Node';
|
|
7
|
+
import { PasteRule } from './PasteRule';
|
|
8
|
+
import { Extensions, GlobalAttributes, KeyboardShortcutCommand, ParentConfig, RawCommands } from './types';
|
|
9
9
|
declare module '@tiptap/core' {
|
|
10
10
|
interface ExtensionConfig<Options = any, Storage = any> {
|
|
11
11
|
[key: string]: any;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { EditorState, Plugin } from 'prosemirror-state';
|
|
2
2
|
import { Editor } from './Editor';
|
|
3
|
-
import {
|
|
3
|
+
import { CanCommands, ChainedCommands, ExtendedRegExpMatchArray, Range, SingleCommands } from './types';
|
|
4
4
|
export declare type InputRuleMatch = {
|
|
5
5
|
index: number;
|
|
6
6
|
text: string;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { DOMOutputSpec,
|
|
1
|
+
import { DOMOutputSpec, Mark as ProseMirrorMark, MarkSpec, MarkType } from 'prosemirror-model';
|
|
2
2
|
import { Plugin, Transaction } from 'prosemirror-state';
|
|
3
|
-
import { InputRule } from './InputRule';
|
|
4
|
-
import { PasteRule } from './PasteRule';
|
|
5
|
-
import { Extensions, Attributes, RawCommands, GlobalAttributes, ParentConfig, KeyboardShortcutCommand } from './types';
|
|
6
|
-
import { Node } from './Node';
|
|
7
3
|
import { MarkConfig } from '.';
|
|
8
4
|
import { Editor } from './Editor';
|
|
5
|
+
import { InputRule } from './InputRule';
|
|
6
|
+
import { Node } from './Node';
|
|
7
|
+
import { PasteRule } from './PasteRule';
|
|
8
|
+
import { Attributes, Extensions, GlobalAttributes, KeyboardShortcutCommand, ParentConfig, RawCommands } from './types';
|
|
9
9
|
declare module '@tiptap/core' {
|
|
10
10
|
interface MarkConfig<Options = any, Storage = any> {
|
|
11
11
|
[key: string]: any;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { DOMOutputSpec,
|
|
1
|
+
import { DOMOutputSpec, Node as ProseMirrorNode, NodeSpec, NodeType } from 'prosemirror-model';
|
|
2
2
|
import { Plugin, Transaction } from 'prosemirror-state';
|
|
3
|
-
import { InputRule } from './InputRule';
|
|
4
|
-
import { PasteRule } from './PasteRule';
|
|
5
|
-
import { Extensions, Attributes, NodeViewRenderer, GlobalAttributes, RawCommands, ParentConfig, KeyboardShortcutCommand } from './types';
|
|
6
3
|
import { NodeConfig } from '.';
|
|
7
4
|
import { Editor } from './Editor';
|
|
5
|
+
import { InputRule } from './InputRule';
|
|
6
|
+
import { PasteRule } from './PasteRule';
|
|
7
|
+
import { Attributes, Extensions, GlobalAttributes, KeyboardShortcutCommand, NodeViewRenderer, ParentConfig, RawCommands } from './types';
|
|
8
8
|
declare module '@tiptap/core' {
|
|
9
9
|
interface NodeConfig<Options = any, Storage = any> {
|
|
10
10
|
[key: string]: any;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { Decoration, NodeView as ProseMirrorNodeView } from 'prosemirror-view';
|
|
2
1
|
import { Node as ProseMirrorNode } from 'prosemirror-model';
|
|
2
|
+
import { Decoration, NodeView as ProseMirrorNodeView } from 'prosemirror-view';
|
|
3
3
|
import { Editor as CoreEditor } from './Editor';
|
|
4
4
|
import { Node } from './Node';
|
|
5
|
-
import {
|
|
5
|
+
import { NodeViewRendererOptions, NodeViewRendererProps } from './types';
|
|
6
6
|
export declare class NodeView<Component, Editor extends CoreEditor = CoreEditor, Options extends NodeViewRendererOptions = NodeViewRendererOptions> implements ProseMirrorNodeView {
|
|
7
7
|
component: Component;
|
|
8
8
|
editor: Editor;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { EditorState, Plugin } from 'prosemirror-state';
|
|
2
2
|
import { Editor } from './Editor';
|
|
3
|
-
import {
|
|
3
|
+
import { CanCommands, ChainedCommands, ExtendedRegExpMatchArray, Range, SingleCommands } from './types';
|
|
4
4
|
export declare type PasteRuleMatch = {
|
|
5
5
|
index: number;
|
|
6
6
|
text: string;
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
export * from './blur';
|
|
2
|
+
export * from './clearContent';
|
|
3
|
+
export * from './clearNodes';
|
|
4
|
+
export * from './command';
|
|
5
|
+
export * from './createParagraphNear';
|
|
6
|
+
export * from './deleteNode';
|
|
7
|
+
export * from './deleteRange';
|
|
8
|
+
export * from './deleteSelection';
|
|
9
|
+
export * from './enter';
|
|
10
|
+
export * from './exitCode';
|
|
11
|
+
export * from './extendMarkRange';
|
|
12
|
+
export * from './first';
|
|
13
|
+
export * from './focus';
|
|
14
|
+
export * from './forEach';
|
|
15
|
+
export * from './insertContent';
|
|
16
|
+
export * from './insertContentAt';
|
|
17
|
+
export * from './joinBackward';
|
|
18
|
+
export * from './joinForward';
|
|
19
|
+
export * from './keyboardShortcut';
|
|
20
|
+
export * from './lift';
|
|
21
|
+
export * from './liftEmptyBlock';
|
|
22
|
+
export * from './liftListItem';
|
|
23
|
+
export * from './newlineInCode';
|
|
24
|
+
export * from './resetAttributes';
|
|
25
|
+
export * from './scrollIntoView';
|
|
26
|
+
export * from './selectAll';
|
|
27
|
+
export * from './selectNodeBackward';
|
|
28
|
+
export * from './selectNodeForward';
|
|
29
|
+
export * from './selectParentNode';
|
|
30
|
+
export * from './selectTextblockEnd';
|
|
31
|
+
export * from './selectTextblockStart';
|
|
32
|
+
export * from './setContent';
|
|
33
|
+
export * from './setMark';
|
|
34
|
+
export * from './setMeta';
|
|
35
|
+
export * from './setNode';
|
|
36
|
+
export * from './setNodeSelection';
|
|
37
|
+
export * from './setTextSelection';
|
|
38
|
+
export * from './sinkListItem';
|
|
39
|
+
export * from './splitBlock';
|
|
40
|
+
export * from './splitListItem';
|
|
41
|
+
export * from './toggleList';
|
|
42
|
+
export * from './toggleMark';
|
|
43
|
+
export * from './toggleNode';
|
|
44
|
+
export * from './toggleWrap';
|
|
45
|
+
export * from './undoInputRule';
|
|
46
|
+
export * from './unsetAllMarks';
|
|
47
|
+
export * from './unsetMark';
|
|
48
|
+
export * from './updateAttributes';
|
|
49
|
+
export * from './wrapIn';
|
|
50
|
+
export * from './wrapInList';
|
|
@@ -1,102 +1,3 @@
|
|
|
1
1
|
import { Extension } from '../Extension';
|
|
2
|
-
|
|
3
|
-
import * as clearContent from '../commands/clearContent';
|
|
4
|
-
import * as clearNodes from '../commands/clearNodes';
|
|
5
|
-
import * as command from '../commands/command';
|
|
6
|
-
import * as createParagraphNear from '../commands/createParagraphNear';
|
|
7
|
-
import * as deleteNode from '../commands/deleteNode';
|
|
8
|
-
import * as deleteRange from '../commands/deleteRange';
|
|
9
|
-
import * as deleteSelection from '../commands/deleteSelection';
|
|
10
|
-
import * as enter from '../commands/enter';
|
|
11
|
-
import * as exitCode from '../commands/exitCode';
|
|
12
|
-
import * as extendMarkRange from '../commands/extendMarkRange';
|
|
13
|
-
import * as first from '../commands/first';
|
|
14
|
-
import * as focus from '../commands/focus';
|
|
15
|
-
import * as forEach from '../commands/forEach';
|
|
16
|
-
import * as insertContent from '../commands/insertContent';
|
|
17
|
-
import * as insertContentAt from '../commands/insertContentAt';
|
|
18
|
-
import * as joinBackward from '../commands/joinBackward';
|
|
19
|
-
import * as joinForward from '../commands/joinForward';
|
|
20
|
-
import * as keyboardShortcut from '../commands/keyboardShortcut';
|
|
21
|
-
import * as lift from '../commands/lift';
|
|
22
|
-
import * as liftEmptyBlock from '../commands/liftEmptyBlock';
|
|
23
|
-
import * as liftListItem from '../commands/liftListItem';
|
|
24
|
-
import * as newlineInCode from '../commands/newlineInCode';
|
|
25
|
-
import * as resetAttributes from '../commands/resetAttributes';
|
|
26
|
-
import * as scrollIntoView from '../commands/scrollIntoView';
|
|
27
|
-
import * as selectAll from '../commands/selectAll';
|
|
28
|
-
import * as selectNodeBackward from '../commands/selectNodeBackward';
|
|
29
|
-
import * as selectNodeForward from '../commands/selectNodeForward';
|
|
30
|
-
import * as selectParentNode from '../commands/selectParentNode';
|
|
31
|
-
import * as selectTextblockEnd from '../commands/selectTextblockEnd';
|
|
32
|
-
import * as selectTextblockStart from '../commands/selectTextblockStart';
|
|
33
|
-
import * as setContent from '../commands/setContent';
|
|
34
|
-
import * as setMark from '../commands/setMark';
|
|
35
|
-
import * as setMeta from '../commands/setMeta';
|
|
36
|
-
import * as setNode from '../commands/setNode';
|
|
37
|
-
import * as setNodeSelection from '../commands/setNodeSelection';
|
|
38
|
-
import * as setTextSelection from '../commands/setTextSelection';
|
|
39
|
-
import * as sinkListItem from '../commands/sinkListItem';
|
|
40
|
-
import * as splitBlock from '../commands/splitBlock';
|
|
41
|
-
import * as splitListItem from '../commands/splitListItem';
|
|
42
|
-
import * as toggleList from '../commands/toggleList';
|
|
43
|
-
import * as toggleMark from '../commands/toggleMark';
|
|
44
|
-
import * as toggleNode from '../commands/toggleNode';
|
|
45
|
-
import * as toggleWrap from '../commands/toggleWrap';
|
|
46
|
-
import * as undoInputRule from '../commands/undoInputRule';
|
|
47
|
-
import * as unsetAllMarks from '../commands/unsetAllMarks';
|
|
48
|
-
import * as unsetMark from '../commands/unsetMark';
|
|
49
|
-
import * as updateAttributes from '../commands/updateAttributes';
|
|
50
|
-
import * as wrapIn from '../commands/wrapIn';
|
|
51
|
-
import * as wrapInList from '../commands/wrapInList';
|
|
52
|
-
export { blur };
|
|
53
|
-
export { clearContent };
|
|
54
|
-
export { clearNodes };
|
|
55
|
-
export { command };
|
|
56
|
-
export { createParagraphNear };
|
|
57
|
-
export { deleteNode };
|
|
58
|
-
export { deleteRange };
|
|
59
|
-
export { deleteSelection };
|
|
60
|
-
export { enter };
|
|
61
|
-
export { exitCode };
|
|
62
|
-
export { extendMarkRange };
|
|
63
|
-
export { first };
|
|
64
|
-
export { focus };
|
|
65
|
-
export { forEach };
|
|
66
|
-
export { insertContent };
|
|
67
|
-
export { insertContentAt };
|
|
68
|
-
export { joinBackward };
|
|
69
|
-
export { joinForward };
|
|
70
|
-
export { keyboardShortcut };
|
|
71
|
-
export { lift };
|
|
72
|
-
export { liftEmptyBlock };
|
|
73
|
-
export { liftListItem };
|
|
74
|
-
export { newlineInCode };
|
|
75
|
-
export { resetAttributes };
|
|
76
|
-
export { scrollIntoView };
|
|
77
|
-
export { selectAll };
|
|
78
|
-
export { selectNodeBackward };
|
|
79
|
-
export { selectNodeForward };
|
|
80
|
-
export { selectParentNode };
|
|
81
|
-
export { selectTextblockEnd };
|
|
82
|
-
export { selectTextblockStart };
|
|
83
|
-
export { setContent };
|
|
84
|
-
export { setMark };
|
|
85
|
-
export { setMeta };
|
|
86
|
-
export { setNode };
|
|
87
|
-
export { setNodeSelection };
|
|
88
|
-
export { setTextSelection };
|
|
89
|
-
export { sinkListItem };
|
|
90
|
-
export { splitBlock };
|
|
91
|
-
export { splitListItem };
|
|
92
|
-
export { toggleList };
|
|
93
|
-
export { toggleMark };
|
|
94
|
-
export { toggleNode };
|
|
95
|
-
export { toggleWrap };
|
|
96
|
-
export { undoInputRule };
|
|
97
|
-
export { unsetAllMarks };
|
|
98
|
-
export { unsetMark };
|
|
99
|
-
export { updateAttributes };
|
|
100
|
-
export { wrapIn };
|
|
101
|
-
export { wrapInList };
|
|
2
|
+
export * from '../commands';
|
|
102
3
|
export declare const Commands: Extension<any, any>;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Node as ProseMirrorNode, ParseOptions, Schema } from 'prosemirror-model';
|
|
2
2
|
import { Content } from '../types';
|
|
3
3
|
export declare function createDocument(content: Content, schema: Schema, parseOptions?: ParseOptions): ProseMirrorNode;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Fragment, Node as ProseMirrorNode, ParseOptions, Schema } from 'prosemirror-model';
|
|
2
2
|
import { Content } from '../types';
|
|
3
3
|
export declare type CreateNodeFromContentOptions = {
|
|
4
4
|
slice?: boolean;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Node as ProseMirrorNode, ResolvedPos } from 'prosemirror-model';
|
|
2
2
|
import { Predicate } from '../types';
|
|
3
3
|
export declare function findParentNodeClosestToPos($pos: ResolvedPos, predicate: Predicate): ({
|
|
4
4
|
pos: number;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { AnyExtension,
|
|
1
|
+
import { AnyExtension, MaybeThisParameterType, RemoveThis } from '../types';
|
|
2
2
|
export declare function getExtensionField<T = any>(extension: AnyExtension, field: string, context?: Omit<MaybeThisParameterType<T>, 'parent'>): RemoveThis<T>;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Fragment, Schema } from 'prosemirror-model';
|
|
2
2
|
export declare function getHTMLFromFragment(fragment: Fragment, schema: Schema): string;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Mark, Node } from 'prosemirror-model';
|
|
2
2
|
import { ExtensionAttribute } from '../types';
|
|
3
3
|
export declare function getRenderedAttributes(nodeOrMark: Node | Mark, extensionAttributes: ExtensionAttribute[]): Record<string, any>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { TextSerializer } from '../types';
|
|
2
1
|
import { Node as ProseMirrorNode } from 'prosemirror-model';
|
|
2
|
+
import { TextSerializer } from '../types';
|
|
3
3
|
export declare function getText(node: ProseMirrorNode, options?: {
|
|
4
4
|
blockSeparator?: string;
|
|
5
5
|
textSerializers?: Record<string, TextSerializer>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Range, TextSerializer } from '../types';
|
|
2
1
|
import { Node as ProseMirrorNode } from 'prosemirror-model';
|
|
2
|
+
import { Range, TextSerializer } from '../types';
|
|
3
3
|
export declare function getTextBetween(startNode: ProseMirrorNode, range: Range, options?: {
|
|
4
4
|
blockSeparator?: string;
|
|
5
5
|
textSerializers?: Record<string, TextSerializer>;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
export * from './combineTransactionSteps';
|
|
2
|
+
export * from './defaultBlockAt';
|
|
3
|
+
export * from './findChildren';
|
|
4
|
+
export * from './findChildrenInRange';
|
|
5
|
+
export * from './findParentNode';
|
|
6
|
+
export * from './findParentNodeClosestToPos';
|
|
7
|
+
export * from './generateHTML';
|
|
8
|
+
export * from './generateJSON';
|
|
9
|
+
export * from './generateText';
|
|
10
|
+
export * from './getAttributes';
|
|
11
|
+
export * from './getChangedRanges';
|
|
12
|
+
export * from './getDebugJSON';
|
|
13
|
+
export * from './getExtensionField';
|
|
14
|
+
export * from './getHTMLFromFragment';
|
|
15
|
+
export * from './getMarkAttributes';
|
|
16
|
+
export * from './getMarkRange';
|
|
17
|
+
export * from './getMarksBetween';
|
|
18
|
+
export * from './getMarkType';
|
|
19
|
+
export * from './getNodeAttributes';
|
|
20
|
+
export * from './getNodeType';
|
|
21
|
+
export * from './getSchema';
|
|
22
|
+
export * from './getText';
|
|
23
|
+
export * from './getTextBetween';
|
|
24
|
+
export * from './getTextContentFromNodes';
|
|
25
|
+
export * from './getTextSerializersFromSchema';
|
|
26
|
+
export * from './isActive';
|
|
27
|
+
export * from './isList';
|
|
28
|
+
export * from './isMarkActive';
|
|
29
|
+
export * from './isNodeActive';
|
|
30
|
+
export * from './isNodeEmpty';
|
|
31
|
+
export * from './isNodeSelection';
|
|
32
|
+
export * from './isTextSelection';
|
|
33
|
+
export * from './posToDOMRect';
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { EditorState } from 'prosemirror-state';
|
|
2
1
|
import { MarkType } from 'prosemirror-model';
|
|
2
|
+
import { EditorState } from 'prosemirror-state';
|
|
3
3
|
export declare function isMarkActive(state: EditorState, typeOrName: MarkType | string | null, attributes?: Record<string, any>): boolean;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { EditorState } from 'prosemirror-state';
|
|
2
1
|
import { NodeType } from 'prosemirror-model';
|
|
2
|
+
import { EditorState } from 'prosemirror-state';
|
|
3
3
|
export declare function isNodeActive(state: EditorState, typeOrName: NodeType | string | null, attributes?: Record<string, any>): boolean;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { Extensions } from '../types';
|
|
2
1
|
import { Extension } from '../Extension';
|
|
3
|
-
import { Node } from '../Node';
|
|
4
2
|
import { Mark } from '../Mark';
|
|
3
|
+
import { Node } from '../Node';
|
|
4
|
+
import { Extensions } from '../types';
|
|
5
5
|
export declare function splitExtensions(extensions: Extensions): {
|
|
6
6
|
baseExtensions: Extension<any, any>[];
|
|
7
7
|
nodeExtensions: Node<any, any>[];
|
|
@@ -1,57 +1,18 @@
|
|
|
1
|
-
|
|
2
|
-
export { extensions };
|
|
1
|
+
export * from './CommandManager';
|
|
3
2
|
export * from './Editor';
|
|
4
3
|
export * from './Extension';
|
|
5
|
-
export * from './
|
|
4
|
+
export * as extensions from './extensions';
|
|
5
|
+
export * from './helpers';
|
|
6
|
+
export * from './InputRule';
|
|
7
|
+
export * from './inputRules';
|
|
6
8
|
export * from './Mark';
|
|
9
|
+
export * from './Node';
|
|
7
10
|
export * from './NodeView';
|
|
8
|
-
export * from './Tracker';
|
|
9
|
-
export * from './InputRule';
|
|
10
11
|
export * from './PasteRule';
|
|
11
|
-
export * from './
|
|
12
|
+
export * from './pasteRules';
|
|
13
|
+
export * from './Tracker';
|
|
12
14
|
export * from './types';
|
|
13
|
-
export * from './
|
|
14
|
-
export * from './inputRules/markInputRule';
|
|
15
|
-
export * from './inputRules/textblockTypeInputRule';
|
|
16
|
-
export * from './inputRules/textInputRule';
|
|
17
|
-
export * from './inputRules/wrappingInputRule';
|
|
18
|
-
export * from './pasteRules/markPasteRule';
|
|
19
|
-
export * from './pasteRules/textPasteRule';
|
|
20
|
-
export * from './utilities/callOrReturn';
|
|
21
|
-
export * from './utilities/escapeForRegEx';
|
|
22
|
-
export * from './utilities/mergeAttributes';
|
|
23
|
-
export * from './helpers/combineTransactionSteps';
|
|
24
|
-
export * from './helpers/defaultBlockAt';
|
|
25
|
-
export * from './helpers/getExtensionField';
|
|
26
|
-
export * from './helpers/findChildren';
|
|
27
|
-
export * from './helpers/findChildrenInRange';
|
|
28
|
-
export * from './helpers/findParentNode';
|
|
29
|
-
export * from './helpers/findParentNodeClosestToPos';
|
|
30
|
-
export * from './helpers/generateHTML';
|
|
31
|
-
export * from './helpers/generateJSON';
|
|
32
|
-
export * from './helpers/generateText';
|
|
33
|
-
export * from './helpers/getChangedRanges';
|
|
34
|
-
export * from './helpers/getSchema';
|
|
35
|
-
export * from './helpers/getHTMLFromFragment';
|
|
36
|
-
export * from './helpers/getDebugJSON';
|
|
37
|
-
export * from './helpers/getAttributes';
|
|
38
|
-
export * from './helpers/getMarkAttributes';
|
|
39
|
-
export * from './helpers/getMarkRange';
|
|
40
|
-
export * from './helpers/getMarkType';
|
|
41
|
-
export * from './helpers/getMarksBetween';
|
|
42
|
-
export * from './helpers/getNodeAttributes';
|
|
43
|
-
export * from './helpers/getNodeType';
|
|
44
|
-
export * from './helpers/getText';
|
|
45
|
-
export * from './helpers/getTextBetween';
|
|
46
|
-
export * from './helpers/getTextSerializersFromSchema';
|
|
47
|
-
export * from './helpers/isActive';
|
|
48
|
-
export * from './helpers/isList';
|
|
49
|
-
export * from './helpers/isMarkActive';
|
|
50
|
-
export * from './helpers/isNodeActive';
|
|
51
|
-
export * from './helpers/isNodeEmpty';
|
|
52
|
-
export * from './helpers/isNodeSelection';
|
|
53
|
-
export * from './helpers/isTextSelection';
|
|
54
|
-
export * from './helpers/posToDOMRect';
|
|
15
|
+
export * from './utilities';
|
|
55
16
|
export interface Commands<ReturnType = any> {
|
|
56
17
|
}
|
|
57
18
|
export interface ExtensionConfig<Options = any, Storage = any> {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { InputRule, InputRuleFinder } from '../InputRule';
|
|
2
1
|
import { MarkType } from 'prosemirror-model';
|
|
2
|
+
import { InputRule, InputRuleFinder } from '../InputRule';
|
|
3
3
|
import { ExtendedRegExpMatchArray } from '../types';
|
|
4
4
|
/**
|
|
5
5
|
* Build an input rule that adds a mark when the
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { InputRule, InputRuleFinder } from '../InputRule';
|
|
2
1
|
import { NodeType } from 'prosemirror-model';
|
|
2
|
+
import { InputRule, InputRuleFinder } from '../InputRule';
|
|
3
3
|
import { ExtendedRegExpMatchArray } from '../types';
|
|
4
4
|
/**
|
|
5
5
|
* Build an input rule that changes the type of a textblock when the
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
+
import { Node as ProseMirrorNode, NodeType } from 'prosemirror-model';
|
|
1
2
|
import { InputRule, InputRuleFinder } from '../InputRule';
|
|
2
|
-
import { NodeType, Node as ProseMirrorNode } from 'prosemirror-model';
|
|
3
3
|
import { ExtendedRegExpMatchArray } from '../types';
|
|
4
4
|
/**
|
|
5
5
|
* Build an input rule for automatically wrapping a textblock when a
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { PasteRule, PasteRuleFinder } from '../PasteRule';
|
|
2
1
|
import { MarkType } from 'prosemirror-model';
|
|
2
|
+
import { PasteRule, PasteRuleFinder } from '../PasteRule';
|
|
3
3
|
import { ExtendedRegExpMatchArray } from '../types';
|
|
4
4
|
/**
|
|
5
5
|
* Build an paste rule that adds a mark when the
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { EditorView, Decoration, NodeView, EditorProps } from 'prosemirror-view';
|
|
1
|
+
import { Mark as ProseMirrorMark, Node as ProseMirrorNode, ParseOptions } from 'prosemirror-model';
|
|
3
2
|
import { EditorState, Transaction } from 'prosemirror-state';
|
|
3
|
+
import { Decoration, EditorProps, EditorView, NodeView } from 'prosemirror-view';
|
|
4
|
+
import { Commands, ExtensionConfig, MarkConfig, NodeConfig } from '.';
|
|
5
|
+
import { Editor } from './Editor';
|
|
4
6
|
import { Extension } from './Extension';
|
|
5
|
-
import { Node } from './Node';
|
|
6
7
|
import { Mark } from './Mark';
|
|
7
|
-
import {
|
|
8
|
-
import { Commands, ExtensionConfig, NodeConfig, MarkConfig } from '.';
|
|
8
|
+
import { Node } from './Node';
|
|
9
9
|
export declare type AnyConfig = ExtensionConfig | NodeConfig | MarkConfig;
|
|
10
10
|
export declare type AnyExtension = Extension | Node | Mark;
|
|
11
11
|
export declare type Extensions = AnyExtension[];
|
|
@@ -105,6 +105,7 @@ export declare type Attribute = {
|
|
|
105
105
|
renderHTML?: ((attributes: Record<string, any>) => Record<string, any> | null) | null;
|
|
106
106
|
parseHTML?: ((element: HTMLElement) => any | null) | null;
|
|
107
107
|
keepOnSplit: boolean;
|
|
108
|
+
isRequired?: boolean;
|
|
108
109
|
};
|
|
109
110
|
export declare type Attributes = {
|
|
110
111
|
[key: string]: Attribute;
|