@tiptap/vue-2 2.5.9 → 2.6.0
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/Editor.d.ts +4 -0
- package/dist/packages/core/src/Extension.d.ts +4 -3
- package/dist/packages/core/src/Mark.d.ts +4 -3
- package/dist/packages/core/src/Node.d.ts +4 -3
- package/dist/packages/core/src/commands/setMeta.d.ts +2 -1
- package/dist/packages/core/src/commands/splitListItem.d.ts +2 -1
- package/dist/packages/core/src/pasteRules/nodePasteRule.d.ts +2 -1
- package/package.json +7 -7
|
@@ -16,6 +16,10 @@ export declare class Editor extends EventEmitter<EditorEvents> {
|
|
|
16
16
|
schema: Schema;
|
|
17
17
|
view: EditorView;
|
|
18
18
|
isFocused: boolean;
|
|
19
|
+
/**
|
|
20
|
+
* The editor is considered initialized after the `create` event has been emitted.
|
|
21
|
+
*/
|
|
22
|
+
isInitialized: boolean;
|
|
19
23
|
extensionStorage: Record<string, any>;
|
|
20
24
|
options: EditorOptions;
|
|
21
25
|
constructor(options?: Partial<EditorOptions>);
|
|
@@ -17,10 +17,10 @@ declare module '@tiptap/core' {
|
|
|
17
17
|
*/
|
|
18
18
|
name: string;
|
|
19
19
|
/**
|
|
20
|
-
* The priority of your extension. The higher, the
|
|
20
|
+
* The priority of your extension. The higher, the earlier it will be called
|
|
21
21
|
* and will take precedence over other extensions with a lower priority.
|
|
22
|
-
* @default
|
|
23
|
-
* @example
|
|
22
|
+
* @default 100
|
|
23
|
+
* @example 101
|
|
24
24
|
*/
|
|
25
25
|
priority?: number;
|
|
26
26
|
/**
|
|
@@ -286,6 +286,7 @@ declare module '@tiptap/core' {
|
|
|
286
286
|
editor: Editor;
|
|
287
287
|
parent: ParentConfig<ExtensionConfig<Options, Storage>>['onTransaction'];
|
|
288
288
|
}, props: {
|
|
289
|
+
editor: Editor;
|
|
289
290
|
transaction: Transaction;
|
|
290
291
|
}) => void) | null;
|
|
291
292
|
/**
|
|
@@ -17,10 +17,10 @@ declare module '@tiptap/core' {
|
|
|
17
17
|
*/
|
|
18
18
|
name: string;
|
|
19
19
|
/**
|
|
20
|
-
* The priority of your extension. The higher, the
|
|
20
|
+
* The priority of your extension. The higher, the earlier it will be called
|
|
21
21
|
* and will take precedence over other extensions with a lower priority.
|
|
22
|
-
* @default
|
|
23
|
-
* @example
|
|
22
|
+
* @default 100
|
|
23
|
+
* @example 101
|
|
24
24
|
*/
|
|
25
25
|
priority?: number;
|
|
26
26
|
/**
|
|
@@ -296,6 +296,7 @@ declare module '@tiptap/core' {
|
|
|
296
296
|
type: MarkType;
|
|
297
297
|
parent: ParentConfig<MarkConfig<Options, Storage>>['onTransaction'];
|
|
298
298
|
}, props: {
|
|
299
|
+
editor: Editor;
|
|
299
300
|
transaction: Transaction;
|
|
300
301
|
}) => void) | null;
|
|
301
302
|
/**
|
|
@@ -17,10 +17,10 @@ declare module '@tiptap/core' {
|
|
|
17
17
|
*/
|
|
18
18
|
name: string;
|
|
19
19
|
/**
|
|
20
|
-
* The priority of your extension. The higher, the
|
|
20
|
+
* The priority of your extension. The higher, the earlier it will be called
|
|
21
21
|
* and will take precedence over other extensions with a lower priority.
|
|
22
|
-
* @default
|
|
23
|
-
* @example
|
|
22
|
+
* @default 100
|
|
23
|
+
* @example 101
|
|
24
24
|
*/
|
|
25
25
|
priority?: number;
|
|
26
26
|
/**
|
|
@@ -297,6 +297,7 @@ declare module '@tiptap/core' {
|
|
|
297
297
|
type: NodeType;
|
|
298
298
|
parent: ParentConfig<NodeConfig<Options, Storage>>['onTransaction'];
|
|
299
299
|
}, props: {
|
|
300
|
+
editor: Editor;
|
|
300
301
|
transaction: Transaction;
|
|
301
302
|
}) => void) | null;
|
|
302
303
|
/**
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { Plugin, PluginKey } from '@tiptap/pm/state';
|
|
1
2
|
import { RawCommands } from '../types.js';
|
|
2
3
|
declare module '@tiptap/core' {
|
|
3
4
|
interface Commands<ReturnType> {
|
|
@@ -8,7 +9,7 @@ declare module '@tiptap/core' {
|
|
|
8
9
|
* @param value The value to store.
|
|
9
10
|
* @example editor.commands.setMeta('foo', 'bar')
|
|
10
11
|
*/
|
|
11
|
-
setMeta: (key: string, value: any) => ReturnType;
|
|
12
|
+
setMeta: (key: string | Plugin | PluginKey, value: any) => ReturnType;
|
|
12
13
|
};
|
|
13
14
|
}
|
|
14
15
|
}
|
|
@@ -6,9 +6,10 @@ declare module '@tiptap/core' {
|
|
|
6
6
|
/**
|
|
7
7
|
* Splits one list item into two list items.
|
|
8
8
|
* @param typeOrName The type or name of the node.
|
|
9
|
+
* @param overrideAttrs The attributes to ensure on the new node.
|
|
9
10
|
* @example editor.commands.splitListItem('listItem')
|
|
10
11
|
*/
|
|
11
|
-
splitListItem: (typeOrName: string | NodeType) => ReturnType;
|
|
12
|
+
splitListItem: (typeOrName: string | NodeType, overrideAttrs?: Record<string, any>) => ReturnType;
|
|
12
13
|
};
|
|
13
14
|
}
|
|
14
15
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { NodeType } from '@tiptap/pm/model';
|
|
2
2
|
import { PasteRule, PasteRuleFinder } from '../PasteRule.js';
|
|
3
|
-
import { ExtendedRegExpMatchArray } from '../types.js';
|
|
3
|
+
import { ExtendedRegExpMatchArray, JSONContent } from '../types.js';
|
|
4
4
|
/**
|
|
5
5
|
* Build an paste rule that adds a node when the
|
|
6
6
|
* matched text is pasted into it.
|
|
@@ -10,4 +10,5 @@ export declare function nodePasteRule(config: {
|
|
|
10
10
|
find: PasteRuleFinder;
|
|
11
11
|
type: NodeType;
|
|
12
12
|
getAttributes?: Record<string, any> | ((match: ExtendedRegExpMatchArray, event: ClipboardEvent) => Record<string, any>) | false | null;
|
|
13
|
+
getContent?: JSONContent[] | ((attrs: Record<string, any>) => JSONContent[]) | false | null;
|
|
13
14
|
}): PasteRule;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tiptap/vue-2",
|
|
3
3
|
"description": "Vue components for tiptap",
|
|
4
|
-
"version": "2.
|
|
4
|
+
"version": "2.6.0",
|
|
5
5
|
"homepage": "https://tiptap.dev",
|
|
6
6
|
"keywords": [
|
|
7
7
|
"tiptap",
|
|
@@ -29,18 +29,18 @@
|
|
|
29
29
|
"dist"
|
|
30
30
|
],
|
|
31
31
|
"dependencies": {
|
|
32
|
-
"@tiptap/extension-bubble-menu": "^2.
|
|
33
|
-
"@tiptap/extension-floating-menu": "^2.
|
|
32
|
+
"@tiptap/extension-bubble-menu": "^2.6.0",
|
|
33
|
+
"@tiptap/extension-floating-menu": "^2.6.0",
|
|
34
34
|
"vue-ts-types": "^1.6.0"
|
|
35
35
|
},
|
|
36
36
|
"devDependencies": {
|
|
37
|
-
"@tiptap/core": "^2.
|
|
38
|
-
"@tiptap/pm": "^2.
|
|
37
|
+
"@tiptap/core": "^2.6.0",
|
|
38
|
+
"@tiptap/pm": "^2.6.0",
|
|
39
39
|
"vue": "^2.6.0"
|
|
40
40
|
},
|
|
41
41
|
"peerDependencies": {
|
|
42
|
-
"@tiptap/core": "^2.
|
|
43
|
-
"@tiptap/pm": "^2.
|
|
42
|
+
"@tiptap/core": "^2.6.0",
|
|
43
|
+
"@tiptap/pm": "^2.6.0",
|
|
44
44
|
"vue": "^2.6.0"
|
|
45
45
|
},
|
|
46
46
|
"repository": {
|