@tiptap/core
Advanced tools
Comparing version 2.0.0-alpha.9 to 2.0.0-alpha.10
@@ -6,2 +6,10 @@ # Change Log | ||
# [2.0.0-alpha.10](https://github.com/ueberdosis/tiptap-next/compare/@tiptap/core@2.0.0-alpha.9...@tiptap/core@2.0.0-alpha.10) (2021-01-06) | ||
**Note:** Version bump only for package @tiptap/core | ||
# [2.0.0-alpha.9](https://github.com/ueberdosis/tiptap-next/compare/@tiptap/core@2.0.0-alpha.8...@tiptap/core@2.0.0-alpha.9) (2020-12-18) | ||
@@ -8,0 +16,0 @@ |
@@ -7,4 +7,5 @@ import { Extension } from '../Extension'; | ||
updateNodeAttributes: (typeOrName: string | import("prosemirror-model").NodeType<any>, attributes: {}) => import("@tiptap/core").Command; | ||
unsetMark: (typeOrName: string | import("prosemirror-model").MarkType<any>) => import("@tiptap/core").Command; | ||
unsetAllMarks: () => import("@tiptap/core").Command; | ||
unsetMark: (typeOrName: string | import("prosemirror-model").MarkType<any>) => import("@tiptap/core").Command; | ||
undoInputRule: () => import("@tiptap/core").Command; | ||
toggleWrap: (typeOrName: string | import("prosemirror-model").NodeType<any>, attributes?: {}) => import("@tiptap/core").Command; | ||
@@ -21,7 +22,13 @@ toggleNode: (typeOrName: string | import("prosemirror-model").NodeType<any>, toggleTypeOrName: string | import("prosemirror-model").NodeType<any>, attrs?: {}) => import("@tiptap/core").Command; | ||
selectParentNode: () => import("@tiptap/core").Command; | ||
selectNodeForward: () => import("@tiptap/core").Command; | ||
selectNodeBackward: () => import("@tiptap/core").Command; | ||
selectAll: () => import("@tiptap/core").Command; | ||
scrollIntoView: () => import("@tiptap/core").Command; | ||
resetNodeAttributes: (typeOrName: string | import("prosemirror-model").NodeType<any>, attributes: string | string[]) => import("@tiptap/core").Command; | ||
newlineInCode: () => import("@tiptap/core").Command; | ||
liftListItem: (typeOrName: string | import("prosemirror-model").NodeType<any>) => import("@tiptap/core").Command; | ||
liftEmptyBlock: () => import("@tiptap/core").Command; | ||
lift: (typeOrName: string | import("prosemirror-model").NodeType<any>, attributes?: {}) => import("@tiptap/core").Command; | ||
joinForward: () => import("@tiptap/core").Command; | ||
joinBackward: () => import("@tiptap/core").Command; | ||
insertText: (value: string) => import("@tiptap/core").Command; | ||
@@ -41,3 +48,5 @@ insertHTML: (value: string) => import("@tiptap/core").Command; | ||
extendMarkRange: (typeOrName: string | import("prosemirror-model").MarkType<any>) => import("@tiptap/core").Command; | ||
exitCode: () => import("@tiptap/core").Command; | ||
deleteSelection: () => import("@tiptap/core").Command; | ||
createParagraphNear: () => import("@tiptap/core").Command; | ||
command: (fn: (props: { | ||
@@ -44,0 +53,0 @@ editor: import("@tiptap/core").Editor; |
{ | ||
"name": "@tiptap/core", | ||
"description": "headless rich text editor", | ||
"version": "2.0.0-alpha.9", | ||
"version": "2.0.0-alpha.10", | ||
"homepage": "https://tiptap.dev", | ||
@@ -46,3 +46,3 @@ "keywords": [ | ||
}, | ||
"gitHead": "d3d6b3d6eae96ee04809e5d328d41409540d25f2" | ||
"gitHead": "f0617771119effea972848c8a64693fc93a020d5" | ||
} |
@@ -216,3 +216,5 @@ import { EditorState, Plugin, Transaction } from 'prosemirror-state' | ||
const coreExtensions = Object.entries(extensions).map(([, extension]) => extension) | ||
const allExtensions = [...this.options.extensions, ...coreExtensions] | ||
const allExtensions = [...this.options.extensions, ...coreExtensions].filter(extension => { | ||
return ['extension', 'node', 'mark'].includes(extension?.type) | ||
}) | ||
@@ -219,0 +221,0 @@ this.extensionManager = new ExtensionManager(allExtensions, this.proxy) |
import { Extension } from '../Extension' | ||
import * as blur from '../commands/blur' | ||
import * as clearContent from '../commands/clearContent' | ||
import * as clearNodes from '../commands/clearNodes' | ||
import * as command from '../commands/command' | ||
import * as clearNodes from '../commands/clearNodes' | ||
import * as createParagraphNear from '../commands/createParagraphNear' | ||
import * as deleteSelection from '../commands/deleteSelection' | ||
import * as exitCode from '../commands/exitCode' | ||
import * as extendMarkRange from '../commands/extendMarkRange' | ||
@@ -12,7 +14,13 @@ import * as first from '../commands/first' | ||
import * as insertText from '../commands/insertText' | ||
import * as joinBackward from '../commands/joinBackward' | ||
import * as joinForward from '../commands/joinForward' | ||
import * as lift from '../commands/lift' | ||
import * as liftEmptyBlock from '../commands/liftEmptyBlock' | ||
import * as liftListItem from '../commands/liftListItem' | ||
import * as newlineInCode from '../commands/newlineInCode' | ||
import * as resetNodeAttributes from '../commands/resetNodeAttributes' | ||
import * as scrollIntoView from '../commands/scrollIntoView' | ||
import * as selectAll from '../commands/selectAll' | ||
import * as selectNodeBackward from '../commands/selectNodeBackward' | ||
import * as selectNodeForward from '../commands/selectNodeForward' | ||
import * as selectParentNode from '../commands/selectParentNode' | ||
@@ -29,2 +37,3 @@ import * as setContent from '../commands/setContent' | ||
import * as toggleWrap from '../commands/toggleWrap' | ||
import * as undoInputRule from '../commands/undoInputRule' | ||
import * as unsetAllMarks from '../commands/unsetAllMarks' | ||
@@ -45,3 +54,5 @@ import * as unsetMark from '../commands/unsetMark' | ||
...command, | ||
...createParagraphNear, | ||
...deleteSelection, | ||
...exitCode, | ||
...extendMarkRange, | ||
@@ -52,7 +63,13 @@ ...first, | ||
...insertText, | ||
...joinBackward, | ||
...joinForward, | ||
...lift, | ||
...liftEmptyBlock, | ||
...liftListItem, | ||
...newlineInCode, | ||
...resetNodeAttributes, | ||
...scrollIntoView, | ||
...selectAll, | ||
...selectNodeBackward, | ||
...selectNodeForward, | ||
...selectParentNode, | ||
@@ -69,4 +86,5 @@ ...setContent, | ||
...toggleWrap, | ||
...undoInputRule, | ||
...unsetAllMarks, | ||
...unsetMark, | ||
...unsetAllMarks, | ||
...updateNodeAttributes, | ||
@@ -73,0 +91,0 @@ ...wrapIn, |
@@ -1,13 +0,1 @@ | ||
import { | ||
newlineInCode, | ||
createParagraphNear, | ||
liftEmptyBlock, | ||
exitCode, | ||
deleteSelection, | ||
joinForward, | ||
joinBackward, | ||
selectNodeForward, | ||
selectNodeBackward, | ||
} from 'prosemirror-commands' | ||
import { undoInputRule } from 'prosemirror-inputrules' | ||
import { Extension } from '../Extension' | ||
@@ -19,23 +7,23 @@ | ||
addKeyboardShortcuts() { | ||
const handleBackspace = () => this.editor.commands.first(({ state, dispatch }) => [ | ||
() => undoInputRule(state, dispatch), | ||
() => deleteSelection(state, dispatch), | ||
() => joinBackward(state, dispatch), | ||
() => selectNodeBackward(state, dispatch), | ||
const handleBackspace = () => this.editor.commands.first(({ commands }) => [ | ||
() => commands.undoInputRule(), | ||
() => commands.deleteSelection(), | ||
() => commands.joinBackward(), | ||
() => commands.selectNodeBackward(), | ||
]) | ||
const handleDelete = () => this.editor.commands.first(({ state, dispatch }) => [ | ||
() => deleteSelection(state, dispatch), | ||
() => joinForward(state, dispatch), | ||
() => selectNodeForward(state, dispatch), | ||
const handleDelete = () => this.editor.commands.first(({ commands }) => [ | ||
() => commands.deleteSelection(), | ||
() => commands.joinForward(), | ||
() => commands.selectNodeForward(), | ||
]) | ||
return { | ||
Enter: () => this.editor.commands.first(({ commands, state, dispatch }) => [ | ||
() => newlineInCode(state, dispatch), | ||
() => createParagraphNear(state, dispatch), | ||
() => liftEmptyBlock(state, dispatch), | ||
Enter: () => this.editor.commands.first(({ commands }) => [ | ||
() => commands.newlineInCode(), | ||
() => commands.createParagraphNear(), | ||
() => commands.liftEmptyBlock(), | ||
() => commands.splitBlock(), | ||
]), | ||
'Mod-Enter': exitCode, | ||
'Mod-Enter': () => this.editor.commands.exitCode(), | ||
Backspace: () => handleBackspace(), | ||
@@ -46,3 +34,3 @@ 'Mod-Backspace': () => handleBackspace(), | ||
// we don’t need a custom `selectAll` for now | ||
// 'Mod-a': () => this.editor.selectAll(), | ||
// 'Mod-a': () => this.editor.commands.selectAll(), | ||
} | ||
@@ -49,0 +37,0 @@ }, |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
2056367
188
12518