@tiptap/core 3.5.3 → 3.6.1
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/index.cjs +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +9 -5
- package/dist/index.d.ts +9 -5
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/package.json +3 -3
- package/src/Editor.ts +2 -2
- package/src/types.ts +6 -4
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tiptap/core",
|
|
3
3
|
"description": "headless rich text editor",
|
|
4
|
-
"version": "3.
|
|
4
|
+
"version": "3.6.1",
|
|
5
5
|
"homepage": "https://tiptap.dev",
|
|
6
6
|
"keywords": [
|
|
7
7
|
"tiptap",
|
|
@@ -52,10 +52,10 @@
|
|
|
52
52
|
"jsx-dev-runtime"
|
|
53
53
|
],
|
|
54
54
|
"devDependencies": {
|
|
55
|
-
"@tiptap/pm": "^3.
|
|
55
|
+
"@tiptap/pm": "^3.6.1"
|
|
56
56
|
},
|
|
57
57
|
"peerDependencies": {
|
|
58
|
-
"@tiptap/pm": "^3.
|
|
58
|
+
"@tiptap/pm": "^3.6.1"
|
|
59
59
|
},
|
|
60
60
|
"repository": {
|
|
61
61
|
"type": "git",
|
package/src/Editor.ts
CHANGED
|
@@ -304,7 +304,7 @@ export class Editor extends EventEmitter<EditorEvents> {
|
|
|
304
304
|
this.editorState = state
|
|
305
305
|
},
|
|
306
306
|
dispatch: (tr: Transaction): ReturnType<EditorView['dispatch']> => {
|
|
307
|
-
this.
|
|
307
|
+
this.dispatchTransaction(tr)
|
|
308
308
|
},
|
|
309
309
|
|
|
310
310
|
// Stub some commonly accessed properties to prevent errors
|
|
@@ -500,7 +500,7 @@ export class Editor extends EventEmitter<EditorEvents> {
|
|
|
500
500
|
/**
|
|
501
501
|
* Creates a ProseMirror view.
|
|
502
502
|
*/
|
|
503
|
-
private createView(element: NonNullable<EditorOptions['element']>
|
|
503
|
+
private createView(element: NonNullable<EditorOptions['element']>): void {
|
|
504
504
|
this.editorView = new EditorView(element, {
|
|
505
505
|
...this.options.editorProps,
|
|
506
506
|
attributes: {
|
package/src/types.ts
CHANGED
|
@@ -261,11 +261,13 @@ export type EnableRules = (AnyExtension | string)[] | boolean
|
|
|
261
261
|
|
|
262
262
|
export interface EditorOptions {
|
|
263
263
|
/**
|
|
264
|
-
* The element
|
|
265
|
-
* If `
|
|
266
|
-
* If
|
|
264
|
+
* The element to bind the editor to:
|
|
265
|
+
* - If an `Element` is passed, the editor will be mounted appended to that element
|
|
266
|
+
* - If `null` is passed, the editor will not be mounted automatically
|
|
267
|
+
* - If an object with a `mount` property is passed, the editor will be mounted to that element
|
|
268
|
+
* - If a function is passed, it will be called with the editor's element, which should place the editor within the document
|
|
267
269
|
*/
|
|
268
|
-
element: Element | null
|
|
270
|
+
element: Element | { mount: HTMLElement } | ((editor: HTMLElement) => void) | null
|
|
269
271
|
/**
|
|
270
272
|
* The content of the editor (HTML, JSON, or a JSON array)
|
|
271
273
|
*/
|