rename AllCommands to Commands
This commit is contained in:
@@ -50,7 +50,7 @@ function getMapFromOptions(options: AnnotationOptions): Y.Map<any> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
declare module '@tiptap/core' {
|
declare module '@tiptap/core' {
|
||||||
interface AllCommands {
|
interface Commands {
|
||||||
annotation: {
|
annotation: {
|
||||||
addAnnotation: (data: any) => Command,
|
addAnnotation: (data: any) => Command,
|
||||||
updateAnnotation: (id: string, data: any) => Command,
|
updateAnnotation: (id: string, data: any) => Command,
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ export interface DetailsOptions {
|
|||||||
}
|
}
|
||||||
|
|
||||||
declare module '@tiptap/core' {
|
declare module '@tiptap/core' {
|
||||||
interface AllCommands {
|
interface Commands {
|
||||||
details: {
|
details: {
|
||||||
/**
|
/**
|
||||||
* Set a details node
|
* Set a details node
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ export interface IframeOptions {
|
|||||||
}
|
}
|
||||||
|
|
||||||
declare module '@tiptap/core' {
|
declare module '@tiptap/core' {
|
||||||
interface AllCommands {
|
interface Commands {
|
||||||
iframe: {
|
iframe: {
|
||||||
/**
|
/**
|
||||||
* Add an iframe
|
* Add an iframe
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import { Command, RawCommands } from '../types'
|
import { Command, RawCommands } from '../types'
|
||||||
|
|
||||||
declare module '@tiptap/core' {
|
declare module '@tiptap/core' {
|
||||||
interface AllCommands {
|
interface Commands {
|
||||||
blur: {
|
blur: {
|
||||||
/**
|
/**
|
||||||
* Removes focus from the editor.
|
* Removes focus from the editor.
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import { Command, RawCommands } from '../types'
|
import { Command, RawCommands } from '../types'
|
||||||
|
|
||||||
declare module '@tiptap/core' {
|
declare module '@tiptap/core' {
|
||||||
interface AllCommands {
|
interface Commands {
|
||||||
clearContent: {
|
clearContent: {
|
||||||
/**
|
/**
|
||||||
* Clear the whole document.
|
* Clear the whole document.
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ import { liftTarget } from 'prosemirror-transform'
|
|||||||
import { Command, RawCommands } from '../types'
|
import { Command, RawCommands } from '../types'
|
||||||
|
|
||||||
declare module '@tiptap/core' {
|
declare module '@tiptap/core' {
|
||||||
interface AllCommands {
|
interface Commands {
|
||||||
clearNodes: {
|
clearNodes: {
|
||||||
/**
|
/**
|
||||||
* Normalize nodes to a simple paragraph.
|
* Normalize nodes to a simple paragraph.
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import { Command, RawCommands } from '../types'
|
import { Command, RawCommands } from '../types'
|
||||||
|
|
||||||
declare module '@tiptap/core' {
|
declare module '@tiptap/core' {
|
||||||
interface AllCommands {
|
interface Commands {
|
||||||
command: {
|
command: {
|
||||||
/**
|
/**
|
||||||
* Define a command inline.
|
* Define a command inline.
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ import { createParagraphNear as originalCreateParagraphNear } from 'prosemirror-
|
|||||||
import { Command, RawCommands } from '../types'
|
import { Command, RawCommands } from '../types'
|
||||||
|
|
||||||
declare module '@tiptap/core' {
|
declare module '@tiptap/core' {
|
||||||
interface AllCommands {
|
interface Commands {
|
||||||
createParagraphNear: {
|
createParagraphNear: {
|
||||||
/**
|
/**
|
||||||
* Create a paragraph nearby.
|
* Create a paragraph nearby.
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import { Command, RawCommands, Range } from '../types'
|
import { Command, RawCommands, Range } from '../types'
|
||||||
|
|
||||||
declare module '@tiptap/core' {
|
declare module '@tiptap/core' {
|
||||||
interface AllCommands {
|
interface Commands {
|
||||||
deleteRange: {
|
deleteRange: {
|
||||||
/**
|
/**
|
||||||
* Delete a given range.
|
* Delete a given range.
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ import { deleteSelection as originalDeleteSelection } from 'prosemirror-commands
|
|||||||
import { Command, RawCommands } from '../types'
|
import { Command, RawCommands } from '../types'
|
||||||
|
|
||||||
declare module '@tiptap/core' {
|
declare module '@tiptap/core' {
|
||||||
interface AllCommands {
|
interface Commands {
|
||||||
deleteSelection: {
|
deleteSelection: {
|
||||||
/**
|
/**
|
||||||
* Delete the selection, if there is one.
|
* Delete the selection, if there is one.
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import { Command, RawCommands } from '../types'
|
import { Command, RawCommands } from '../types'
|
||||||
|
|
||||||
declare module '@tiptap/core' {
|
declare module '@tiptap/core' {
|
||||||
interface AllCommands {
|
interface Commands {
|
||||||
enter: {
|
enter: {
|
||||||
/**
|
/**
|
||||||
* Trigger enter.
|
* Trigger enter.
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ import { exitCode as originalExitCode } from 'prosemirror-commands'
|
|||||||
import { Command, RawCommands } from '../types'
|
import { Command, RawCommands } from '../types'
|
||||||
|
|
||||||
declare module '@tiptap/core' {
|
declare module '@tiptap/core' {
|
||||||
interface AllCommands {
|
interface Commands {
|
||||||
exitCode: {
|
exitCode: {
|
||||||
/**
|
/**
|
||||||
* Exit from a code block.
|
* Exit from a code block.
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import getMarkType from '../helpers/getMarkType'
|
|||||||
import getMarkRange from '../helpers/getMarkRange'
|
import getMarkRange from '../helpers/getMarkRange'
|
||||||
|
|
||||||
declare module '@tiptap/core' {
|
declare module '@tiptap/core' {
|
||||||
interface AllCommands {
|
interface Commands {
|
||||||
extendMarkRange: {
|
extendMarkRange: {
|
||||||
/**
|
/**
|
||||||
* Extends the text selection to the current mark.
|
* Extends the text selection to the current mark.
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import { Command, RawCommands } from '../types'
|
import { Command, RawCommands } from '../types'
|
||||||
|
|
||||||
declare module '@tiptap/core' {
|
declare module '@tiptap/core' {
|
||||||
interface AllCommands {
|
interface Commands {
|
||||||
first: {
|
first: {
|
||||||
/**
|
/**
|
||||||
* Runs one command after the other and stops at the first which returns true.
|
* Runs one command after the other and stops at the first which returns true.
|
||||||
|
|||||||
@@ -31,7 +31,7 @@ function resolveSelection(state: EditorState, position: FocusPosition = null) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
declare module '@tiptap/core' {
|
declare module '@tiptap/core' {
|
||||||
interface AllCommands {
|
interface Commands {
|
||||||
focus: {
|
focus: {
|
||||||
/**
|
/**
|
||||||
* Focus the editor at the given position.
|
* Focus the editor at the given position.
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ function selectionToInsertionEnd(tr: Transaction, startLen: number, bias: number
|
|||||||
}
|
}
|
||||||
|
|
||||||
declare module '@tiptap/core' {
|
declare module '@tiptap/core' {
|
||||||
interface AllCommands {
|
interface Commands {
|
||||||
insertHTML: {
|
insertHTML: {
|
||||||
/**
|
/**
|
||||||
* Insert a string of HTML at the current position.
|
* Insert a string of HTML at the current position.
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import { Command, RawCommands } from '../types'
|
import { Command, RawCommands } from '../types'
|
||||||
|
|
||||||
declare module '@tiptap/core' {
|
declare module '@tiptap/core' {
|
||||||
interface AllCommands {
|
interface Commands {
|
||||||
insertText: {
|
insertText: {
|
||||||
/**
|
/**
|
||||||
* Insert a string of text at the current position.
|
* Insert a string of text at the current position.
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ import { joinBackward as originalJoinBackward } from 'prosemirror-commands'
|
|||||||
import { Command, RawCommands } from '../types'
|
import { Command, RawCommands } from '../types'
|
||||||
|
|
||||||
declare module '@tiptap/core' {
|
declare module '@tiptap/core' {
|
||||||
interface AllCommands {
|
interface Commands {
|
||||||
joinBackward: {
|
joinBackward: {
|
||||||
/**
|
/**
|
||||||
* Join two nodes backward.
|
* Join two nodes backward.
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ import { joinForward as originalJoinForward } from 'prosemirror-commands'
|
|||||||
import { Command, RawCommands } from '../types'
|
import { Command, RawCommands } from '../types'
|
||||||
|
|
||||||
declare module '@tiptap/core' {
|
declare module '@tiptap/core' {
|
||||||
interface AllCommands {
|
interface Commands {
|
||||||
joinForward: {
|
joinForward: {
|
||||||
/**
|
/**
|
||||||
* Join two nodes forward.
|
* Join two nodes forward.
|
||||||
|
|||||||
@@ -57,7 +57,7 @@ function normalizeKeyName(name: string) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
declare module '@tiptap/core' {
|
declare module '@tiptap/core' {
|
||||||
interface AllCommands {
|
interface Commands {
|
||||||
keyboardShortcut: {
|
keyboardShortcut: {
|
||||||
/**
|
/**
|
||||||
* Trigger a keyboard shortcut.
|
* Trigger a keyboard shortcut.
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import isNodeActive from '../helpers/isNodeActive'
|
|||||||
import getNodeType from '../helpers/getNodeType'
|
import getNodeType from '../helpers/getNodeType'
|
||||||
|
|
||||||
declare module '@tiptap/core' {
|
declare module '@tiptap/core' {
|
||||||
interface AllCommands {
|
interface Commands {
|
||||||
lift: {
|
lift: {
|
||||||
/**
|
/**
|
||||||
* Removes an existing wrap.
|
* Removes an existing wrap.
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ import { liftEmptyBlock as originalLiftEmptyBlock } from 'prosemirror-commands'
|
|||||||
import { Command, RawCommands } from '../types'
|
import { Command, RawCommands } from '../types'
|
||||||
|
|
||||||
declare module '@tiptap/core' {
|
declare module '@tiptap/core' {
|
||||||
interface AllCommands {
|
interface Commands {
|
||||||
liftEmptyBlock: {
|
liftEmptyBlock: {
|
||||||
/**
|
/**
|
||||||
* Lift block if empty.
|
* Lift block if empty.
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ import { Command, RawCommands } from '../types'
|
|||||||
import getNodeType from '../helpers/getNodeType'
|
import getNodeType from '../helpers/getNodeType'
|
||||||
|
|
||||||
declare module '@tiptap/core' {
|
declare module '@tiptap/core' {
|
||||||
interface AllCommands {
|
interface Commands {
|
||||||
liftListItem: {
|
liftListItem: {
|
||||||
/**
|
/**
|
||||||
* Lift the list item into a wrapping list.
|
* Lift the list item into a wrapping list.
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ import { newlineInCode as originalNewlineInCode } from 'prosemirror-commands'
|
|||||||
import { Command, RawCommands } from '../types'
|
import { Command, RawCommands } from '../types'
|
||||||
|
|
||||||
declare module '@tiptap/core' {
|
declare module '@tiptap/core' {
|
||||||
interface AllCommands {
|
interface Commands {
|
||||||
newlineInCode: {
|
newlineInCode: {
|
||||||
/**
|
/**
|
||||||
* Add a newline character in code.
|
* Add a newline character in code.
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ import { NodeType } from 'prosemirror-model'
|
|||||||
import { Command, RawCommands, AnyObject } from '../types'
|
import { Command, RawCommands, AnyObject } from '../types'
|
||||||
|
|
||||||
declare module '@tiptap/core' {
|
declare module '@tiptap/core' {
|
||||||
interface AllCommands {
|
interface Commands {
|
||||||
replace: {
|
replace: {
|
||||||
/**
|
/**
|
||||||
* Replaces text with a node.
|
* Replaces text with a node.
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ import {
|
|||||||
} from '../types'
|
} from '../types'
|
||||||
|
|
||||||
declare module '@tiptap/core' {
|
declare module '@tiptap/core' {
|
||||||
interface AllCommands {
|
interface Commands {
|
||||||
replaceRange: {
|
replaceRange: {
|
||||||
/**
|
/**
|
||||||
* Replaces text with a node within a range.
|
* Replaces text with a node within a range.
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ import deleteProps from '../utilities/deleteProps'
|
|||||||
import { Command, RawCommands } from '../types'
|
import { Command, RawCommands } from '../types'
|
||||||
|
|
||||||
declare module '@tiptap/core' {
|
declare module '@tiptap/core' {
|
||||||
interface AllCommands {
|
interface Commands {
|
||||||
resetNodeAttributes: {
|
resetNodeAttributes: {
|
||||||
/**
|
/**
|
||||||
* Resets node attributes to the default value.
|
* Resets node attributes to the default value.
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import { Command, RawCommands } from '../types'
|
import { Command, RawCommands } from '../types'
|
||||||
|
|
||||||
declare module '@tiptap/core' {
|
declare module '@tiptap/core' {
|
||||||
interface AllCommands {
|
interface Commands {
|
||||||
scrollIntoView: {
|
scrollIntoView: {
|
||||||
/**
|
/**
|
||||||
* Scroll the selection into view.
|
* Scroll the selection into view.
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ import { selectAll as originalSelectAll } from 'prosemirror-commands'
|
|||||||
import { Command, RawCommands } from '../types'
|
import { Command, RawCommands } from '../types'
|
||||||
|
|
||||||
declare module '@tiptap/core' {
|
declare module '@tiptap/core' {
|
||||||
interface AllCommands {
|
interface Commands {
|
||||||
selectAll: {
|
selectAll: {
|
||||||
/**
|
/**
|
||||||
* Select the whole document.
|
* Select the whole document.
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ import { selectNodeBackward as originalSelectNodeBackward } from 'prosemirror-co
|
|||||||
import { Command, RawCommands } from '../types'
|
import { Command, RawCommands } from '../types'
|
||||||
|
|
||||||
declare module '@tiptap/core' {
|
declare module '@tiptap/core' {
|
||||||
interface AllCommands {
|
interface Commands {
|
||||||
selectNodeBackward: {
|
selectNodeBackward: {
|
||||||
/**
|
/**
|
||||||
* Select a node backward.
|
* Select a node backward.
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ import { selectNodeForward as originalSelectNodeForward } from 'prosemirror-comm
|
|||||||
import { Command, RawCommands } from '../types'
|
import { Command, RawCommands } from '../types'
|
||||||
|
|
||||||
declare module '@tiptap/core' {
|
declare module '@tiptap/core' {
|
||||||
interface AllCommands {
|
interface Commands {
|
||||||
selectNodeForward: {
|
selectNodeForward: {
|
||||||
/**
|
/**
|
||||||
* Select a node forward.
|
* Select a node forward.
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ import { selectParentNode as originalSelectParentNode } from 'prosemirror-comman
|
|||||||
import { Command, RawCommands } from '../types'
|
import { Command, RawCommands } from '../types'
|
||||||
|
|
||||||
declare module '@tiptap/core' {
|
declare module '@tiptap/core' {
|
||||||
interface AllCommands {
|
interface Commands {
|
||||||
selectParentNode: {
|
selectParentNode: {
|
||||||
/**
|
/**
|
||||||
* Select the parent node.
|
* Select the parent node.
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ import { TextSelection } from 'prosemirror-state'
|
|||||||
import { AnyObject, Command, RawCommands } from '../types'
|
import { AnyObject, Command, RawCommands } from '../types'
|
||||||
|
|
||||||
declare module '@tiptap/core' {
|
declare module '@tiptap/core' {
|
||||||
interface AllCommands {
|
interface Commands {
|
||||||
setContent: {
|
setContent: {
|
||||||
/**
|
/**
|
||||||
* Replace the whole document with new content.
|
* Replace the whole document with new content.
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ import getMarkType from '../helpers/getMarkType'
|
|||||||
import getMarkAttributes from '../helpers/getMarkAttributes'
|
import getMarkAttributes from '../helpers/getMarkAttributes'
|
||||||
|
|
||||||
declare module '@tiptap/core' {
|
declare module '@tiptap/core' {
|
||||||
interface AllCommands {
|
interface Commands {
|
||||||
setMark: {
|
setMark: {
|
||||||
/**
|
/**
|
||||||
* Add a mark with new attributes.
|
* Add a mark with new attributes.
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ import { AnyObject, Command, RawCommands } from '../types'
|
|||||||
import getNodeType from '../helpers/getNodeType'
|
import getNodeType from '../helpers/getNodeType'
|
||||||
|
|
||||||
declare module '@tiptap/core' {
|
declare module '@tiptap/core' {
|
||||||
interface AllCommands {
|
interface Commands {
|
||||||
setNode: {
|
setNode: {
|
||||||
/**
|
/**
|
||||||
* Replace a given range with a node.
|
* Replace a given range with a node.
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ import { Command, RawCommands } from '../types'
|
|||||||
import getNodeType from '../helpers/getNodeType'
|
import getNodeType from '../helpers/getNodeType'
|
||||||
|
|
||||||
declare module '@tiptap/core' {
|
declare module '@tiptap/core' {
|
||||||
interface AllCommands {
|
interface Commands {
|
||||||
sinkListItem: {
|
sinkListItem: {
|
||||||
/**
|
/**
|
||||||
* Sink the list item down into an inner list.
|
* Sink the list item down into an inner list.
|
||||||
|
|||||||
@@ -25,7 +25,7 @@ function ensureMarks(state: EditorState) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
declare module '@tiptap/core' {
|
declare module '@tiptap/core' {
|
||||||
interface AllCommands {
|
interface Commands {
|
||||||
splitBlock: {
|
splitBlock: {
|
||||||
/**
|
/**
|
||||||
* Forks a new node from an existing node.
|
* Forks a new node from an existing node.
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ import getNodeType from '../helpers/getNodeType'
|
|||||||
import getSplittedAttributes from '../helpers/getSplittedAttributes'
|
import getSplittedAttributes from '../helpers/getSplittedAttributes'
|
||||||
|
|
||||||
declare module '@tiptap/core' {
|
declare module '@tiptap/core' {
|
||||||
interface AllCommands {
|
interface Commands {
|
||||||
splitListItem: {
|
splitListItem: {
|
||||||
/**
|
/**
|
||||||
* Splits one list item into two list items.
|
* Splits one list item into two list items.
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import findParentNode from '../helpers/findParentNode'
|
|||||||
import isList from '../helpers/isList'
|
import isList from '../helpers/isList'
|
||||||
|
|
||||||
declare module '@tiptap/core' {
|
declare module '@tiptap/core' {
|
||||||
interface AllCommands {
|
interface Commands {
|
||||||
toggleList: {
|
toggleList: {
|
||||||
/**
|
/**
|
||||||
* Toggle between different list types.
|
* Toggle between different list types.
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ import getMarkType from '../helpers/getMarkType'
|
|||||||
import isMarkActive from '../helpers/isMarkActive'
|
import isMarkActive from '../helpers/isMarkActive'
|
||||||
|
|
||||||
declare module '@tiptap/core' {
|
declare module '@tiptap/core' {
|
||||||
interface AllCommands {
|
interface Commands {
|
||||||
toggleMark: {
|
toggleMark: {
|
||||||
/**
|
/**
|
||||||
* Toggle a mark on and off.
|
* Toggle a mark on and off.
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ import isNodeActive from '../helpers/isNodeActive'
|
|||||||
import getNodeType from '../helpers/getNodeType'
|
import getNodeType from '../helpers/getNodeType'
|
||||||
|
|
||||||
declare module '@tiptap/core' {
|
declare module '@tiptap/core' {
|
||||||
interface AllCommands {
|
interface Commands {
|
||||||
toggleNode: {
|
toggleNode: {
|
||||||
/**
|
/**
|
||||||
* Toggle a node with another node.
|
* Toggle a node with another node.
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import isNodeActive from '../helpers/isNodeActive'
|
|||||||
import getNodeType from '../helpers/getNodeType'
|
import getNodeType from '../helpers/getNodeType'
|
||||||
|
|
||||||
declare module '@tiptap/core' {
|
declare module '@tiptap/core' {
|
||||||
interface AllCommands {
|
interface Commands {
|
||||||
toggleWrap: {
|
toggleWrap: {
|
||||||
/**
|
/**
|
||||||
* Wraps nodes in another node, or removes an existing wrap.
|
* Wraps nodes in another node, or removes an existing wrap.
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ import { undoInputRule as originalUndoInputRule } from 'prosemirror-inputrules'
|
|||||||
import { Command, RawCommands } from '../types'
|
import { Command, RawCommands } from '../types'
|
||||||
|
|
||||||
declare module '@tiptap/core' {
|
declare module '@tiptap/core' {
|
||||||
interface AllCommands {
|
interface Commands {
|
||||||
undoInputRule: {
|
undoInputRule: {
|
||||||
/**
|
/**
|
||||||
* Undo an input rule.
|
* Undo an input rule.
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import { Command, RawCommands } from '../types'
|
import { Command, RawCommands } from '../types'
|
||||||
|
|
||||||
declare module '@tiptap/core' {
|
declare module '@tiptap/core' {
|
||||||
interface AllCommands {
|
interface Commands {
|
||||||
unsetAllMarks: {
|
unsetAllMarks: {
|
||||||
/**
|
/**
|
||||||
* Remove all marks in the current selection.
|
* Remove all marks in the current selection.
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ import getMarkType from '../helpers/getMarkType'
|
|||||||
import getMarkRange from '../helpers/getMarkRange'
|
import getMarkRange from '../helpers/getMarkRange'
|
||||||
|
|
||||||
declare module '@tiptap/core' {
|
declare module '@tiptap/core' {
|
||||||
interface AllCommands {
|
interface Commands {
|
||||||
unsetMark: {
|
unsetMark: {
|
||||||
/**
|
/**
|
||||||
* Remove all marks in the current selection.
|
* Remove all marks in the current selection.
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ import getNodeType from '../helpers/getNodeType'
|
|||||||
import { AnyObject, Command, RawCommands } from '../types'
|
import { AnyObject, Command, RawCommands } from '../types'
|
||||||
|
|
||||||
declare module '@tiptap/core' {
|
declare module '@tiptap/core' {
|
||||||
interface AllCommands {
|
interface Commands {
|
||||||
updateNodeAttributes: {
|
updateNodeAttributes: {
|
||||||
/**
|
/**
|
||||||
* Update attributes of a node.
|
* Update attributes of a node.
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import isNodeActive from '../helpers/isNodeActive'
|
|||||||
import getNodeType from '../helpers/getNodeType'
|
import getNodeType from '../helpers/getNodeType'
|
||||||
|
|
||||||
declare module '@tiptap/core' {
|
declare module '@tiptap/core' {
|
||||||
interface AllCommands {
|
interface Commands {
|
||||||
wrapIn: {
|
wrapIn: {
|
||||||
/**
|
/**
|
||||||
* Wraps nodes in another node.
|
* Wraps nodes in another node.
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ import { AnyObject, Command, RawCommands } from '../types'
|
|||||||
import getNodeType from '../helpers/getNodeType'
|
import getNodeType from '../helpers/getNodeType'
|
||||||
|
|
||||||
declare module '@tiptap/core' {
|
declare module '@tiptap/core' {
|
||||||
interface AllCommands {
|
interface Commands {
|
||||||
wrapInList: {
|
wrapInList: {
|
||||||
/**
|
/**
|
||||||
* Wrap a node in a list.
|
* Wrap a node in a list.
|
||||||
|
|||||||
@@ -21,4 +21,4 @@ export { default as isTextSelection } from './helpers/isTextSelection'
|
|||||||
export { default as isCellSelection } from './helpers/isCellSelection'
|
export { default as isCellSelection } from './helpers/isCellSelection'
|
||||||
export { default as findParentNodeClosestToPos } from './helpers/findParentNodeClosestToPos'
|
export { default as findParentNodeClosestToPos } from './helpers/findParentNodeClosestToPos'
|
||||||
|
|
||||||
export interface AllCommands {}
|
export interface Commands {}
|
||||||
|
|||||||
@@ -14,9 +14,9 @@ import { Extension } from './Extension'
|
|||||||
import { Node } from './Node'
|
import { Node } from './Node'
|
||||||
import { Mark } from './Mark'
|
import { Mark } from './Mark'
|
||||||
import { Editor } from './Editor'
|
import { Editor } from './Editor'
|
||||||
import { AllCommands } from '.'
|
import { Commands } from '.'
|
||||||
|
|
||||||
export { AllCommands }
|
export { Commands }
|
||||||
|
|
||||||
export type Extensions = (Extension | Node | Mark)[]
|
export type Extensions = (Extension | Node | Mark)[]
|
||||||
|
|
||||||
@@ -112,7 +112,7 @@ export type NodeViewRendererProps = {
|
|||||||
|
|
||||||
export type NodeViewRenderer = (props: NodeViewRendererProps) => (NodeView | {})
|
export type NodeViewRenderer = (props: NodeViewRendererProps) => (NodeView | {})
|
||||||
|
|
||||||
export type UnionCommands = UnionToIntersection<ValuesOf<Pick<AllCommands, KeysWithTypeOf<AllCommands, {}>>>>
|
export type UnionCommands = UnionToIntersection<ValuesOf<Pick<Commands, KeysWithTypeOf<Commands, {}>>>>
|
||||||
|
|
||||||
export type RawCommands = {
|
export type RawCommands = {
|
||||||
[Item in keyof UnionCommands]: UnionCommands[Item] extends (...args: any[]) => any
|
[Item in keyof UnionCommands]: UnionCommands[Item] extends (...args: any[]) => any
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ export interface BlockquoteOptions {
|
|||||||
}
|
}
|
||||||
|
|
||||||
declare module '@tiptap/core' {
|
declare module '@tiptap/core' {
|
||||||
interface AllCommands {
|
interface Commands {
|
||||||
blockQuote: {
|
blockQuote: {
|
||||||
/**
|
/**
|
||||||
* Set a blockquote node
|
* Set a blockquote node
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ export interface BoldOptions {
|
|||||||
}
|
}
|
||||||
|
|
||||||
declare module '@tiptap/core' {
|
declare module '@tiptap/core' {
|
||||||
interface AllCommands {
|
interface Commands {
|
||||||
bold: {
|
bold: {
|
||||||
/**
|
/**
|
||||||
* Set a bold mark
|
* Set a bold mark
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ export interface BulletListOptions {
|
|||||||
}
|
}
|
||||||
|
|
||||||
declare module '@tiptap/core' {
|
declare module '@tiptap/core' {
|
||||||
interface AllCommands {
|
interface Commands {
|
||||||
bulletList: {
|
bulletList: {
|
||||||
/**
|
/**
|
||||||
* Toggle a bullet list
|
* Toggle a bullet list
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ export interface CodeBlockOptions {
|
|||||||
}
|
}
|
||||||
|
|
||||||
declare module '@tiptap/core' {
|
declare module '@tiptap/core' {
|
||||||
interface AllCommands {
|
interface Commands {
|
||||||
codeBlock: {
|
codeBlock: {
|
||||||
/**
|
/**
|
||||||
* Set a code block
|
* Set a code block
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ export interface CodeOptions {
|
|||||||
}
|
}
|
||||||
|
|
||||||
declare module '@tiptap/core' {
|
declare module '@tiptap/core' {
|
||||||
interface AllCommands {
|
interface Commands {
|
||||||
code: {
|
code: {
|
||||||
/**
|
/**
|
||||||
* Set a code mark
|
* Set a code mark
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ export interface CollaborationCursorOptions {
|
|||||||
}
|
}
|
||||||
|
|
||||||
declare module '@tiptap/core' {
|
declare module '@tiptap/core' {
|
||||||
interface AllCommands {
|
interface Commands {
|
||||||
collaborationCursor: {
|
collaborationCursor: {
|
||||||
/**
|
/**
|
||||||
* Update details of the current user
|
* Update details of the current user
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ import {
|
|||||||
} from 'y-prosemirror'
|
} from 'y-prosemirror'
|
||||||
|
|
||||||
declare module '@tiptap/core' {
|
declare module '@tiptap/core' {
|
||||||
interface AllCommands {
|
interface Commands {
|
||||||
collaboration: {
|
collaboration: {
|
||||||
/**
|
/**
|
||||||
* Undo recent changes
|
* Undo recent changes
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ type FontFamilyOptions = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
declare module '@tiptap/core' {
|
declare module '@tiptap/core' {
|
||||||
interface AllCommands {
|
interface Commands {
|
||||||
fontFamily: {
|
fontFamily: {
|
||||||
/**
|
/**
|
||||||
* Set the font family
|
* Set the font family
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ export interface HardBreakOptions {
|
|||||||
}
|
}
|
||||||
|
|
||||||
declare module '@tiptap/core' {
|
declare module '@tiptap/core' {
|
||||||
interface AllCommands {
|
interface Commands {
|
||||||
hardBreak: {
|
hardBreak: {
|
||||||
/**
|
/**
|
||||||
* Add a hard break
|
* Add a hard break
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ export interface HeadingOptions {
|
|||||||
}
|
}
|
||||||
|
|
||||||
declare module '@tiptap/core' {
|
declare module '@tiptap/core' {
|
||||||
interface AllCommands {
|
interface Commands {
|
||||||
heading: {
|
heading: {
|
||||||
/**
|
/**
|
||||||
* Set a heading node
|
* Set a heading node
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ export interface HighlightOptions {
|
|||||||
}
|
}
|
||||||
|
|
||||||
declare module '@tiptap/core' {
|
declare module '@tiptap/core' {
|
||||||
interface AllCommands {
|
interface Commands {
|
||||||
highlight: {
|
highlight: {
|
||||||
/**
|
/**
|
||||||
* Set a highlight mark
|
* Set a highlight mark
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ export interface HistoryOptions {
|
|||||||
}
|
}
|
||||||
|
|
||||||
declare module '@tiptap/core' {
|
declare module '@tiptap/core' {
|
||||||
interface AllCommands {
|
interface Commands {
|
||||||
history: {
|
history: {
|
||||||
/**
|
/**
|
||||||
* Undo recent changes
|
* Undo recent changes
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ export interface HorizontalRuleOptions {
|
|||||||
}
|
}
|
||||||
|
|
||||||
declare module '@tiptap/core' {
|
declare module '@tiptap/core' {
|
||||||
interface AllCommands {
|
interface Commands {
|
||||||
horizontalRule: {
|
horizontalRule: {
|
||||||
/**
|
/**
|
||||||
* Add a horizontal rule
|
* Add a horizontal rule
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ export interface ImageOptions {
|
|||||||
}
|
}
|
||||||
|
|
||||||
declare module '@tiptap/core' {
|
declare module '@tiptap/core' {
|
||||||
interface AllCommands {
|
interface Commands {
|
||||||
image: {
|
image: {
|
||||||
/**
|
/**
|
||||||
* Add an image
|
* Add an image
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ export interface ItalicOptions {
|
|||||||
}
|
}
|
||||||
|
|
||||||
declare module '@tiptap/core' {
|
declare module '@tiptap/core' {
|
||||||
interface AllCommands {
|
interface Commands {
|
||||||
italic: {
|
italic: {
|
||||||
/**
|
/**
|
||||||
* Set an italic mark
|
* Set an italic mark
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ export interface LinkOptions {
|
|||||||
}
|
}
|
||||||
|
|
||||||
declare module '@tiptap/core' {
|
declare module '@tiptap/core' {
|
||||||
interface AllCommands {
|
interface Commands {
|
||||||
link: {
|
link: {
|
||||||
/**
|
/**
|
||||||
* Set a link mark
|
* Set a link mark
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ export interface OrderedListOptions {
|
|||||||
}
|
}
|
||||||
|
|
||||||
declare module '@tiptap/core' {
|
declare module '@tiptap/core' {
|
||||||
interface AllCommands {
|
interface Commands {
|
||||||
orderedList: {
|
orderedList: {
|
||||||
/**
|
/**
|
||||||
* Toggle an ordered list
|
* Toggle an ordered list
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ export interface ParagraphOptions {
|
|||||||
}
|
}
|
||||||
|
|
||||||
declare module '@tiptap/core' {
|
declare module '@tiptap/core' {
|
||||||
interface AllCommands {
|
interface Commands {
|
||||||
paragraph: {
|
paragraph: {
|
||||||
/**
|
/**
|
||||||
* Toggle a paragraph
|
* Toggle a paragraph
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ export interface StrikeOptions {
|
|||||||
}
|
}
|
||||||
|
|
||||||
declare module '@tiptap/core' {
|
declare module '@tiptap/core' {
|
||||||
interface AllCommands {
|
interface Commands {
|
||||||
strike: {
|
strike: {
|
||||||
/**
|
/**
|
||||||
* Set a strike mark
|
* Set a strike mark
|
||||||
|
|||||||
@@ -42,7 +42,7 @@ export interface TableOptions {
|
|||||||
}
|
}
|
||||||
|
|
||||||
declare module '@tiptap/core' {
|
declare module '@tiptap/core' {
|
||||||
interface AllCommands {
|
interface Commands {
|
||||||
table: {
|
table: {
|
||||||
insertTable: (options?: { rows?: number, cols?: number, withHeaderRow?: boolean }) => Command,
|
insertTable: (options?: { rows?: number, cols?: number, withHeaderRow?: boolean }) => Command,
|
||||||
addColumnBefore: () => Command,
|
addColumnBefore: () => Command,
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ export interface TaskListOptions {
|
|||||||
}
|
}
|
||||||
|
|
||||||
declare module '@tiptap/core' {
|
declare module '@tiptap/core' {
|
||||||
interface AllCommands {
|
interface Commands {
|
||||||
taskList: {
|
taskList: {
|
||||||
/**
|
/**
|
||||||
* Toggle a task list
|
* Toggle a task list
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ type TextAlignOptions = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
declare module '@tiptap/core' {
|
declare module '@tiptap/core' {
|
||||||
interface AllCommands {
|
interface Commands {
|
||||||
textAlign: {
|
textAlign: {
|
||||||
/**
|
/**
|
||||||
* Set the text align attribute
|
* Set the text align attribute
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ export interface TextStyleOptions {
|
|||||||
}
|
}
|
||||||
|
|
||||||
declare module '@tiptap/core' {
|
declare module '@tiptap/core' {
|
||||||
interface AllCommands {
|
interface Commands {
|
||||||
textStyle: {
|
textStyle: {
|
||||||
/**
|
/**
|
||||||
* Remove spans without inline style attributes.
|
* Remove spans without inline style attributes.
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ export interface UnderlineOptions {
|
|||||||
}
|
}
|
||||||
|
|
||||||
declare module '@tiptap/core' {
|
declare module '@tiptap/core' {
|
||||||
interface AllCommands {
|
interface Commands {
|
||||||
underline: {
|
underline: {
|
||||||
/**
|
/**
|
||||||
* Set an underline mark
|
* Set an underline mark
|
||||||
|
|||||||
Reference in New Issue
Block a user