@tiptap/core 3.0.0-beta.26 → 3.0.0-beta.27
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 +142 -15389
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +0 -31
- package/dist/index.d.ts +0 -31
- package/dist/index.js +5 -39
- package/dist/index.js.map +1 -1
- package/package.json +3 -4
- package/src/Editor.ts +0 -43
- package/src/types.ts +0 -12
- package/dist/chunk-G3PMV62Z.js +0 -36
- package/dist/chunk-G3PMV62Z.js.map +0 -1
- package/dist/dist-GJ4HMHO4.js +0 -15184
- package/dist/dist-GJ4HMHO4.js.map +0 -1
package/dist/index.d.cts
CHANGED
|
@@ -1172,18 +1172,6 @@ interface EditorOptions {
|
|
|
1172
1172
|
* @default false
|
|
1173
1173
|
*/
|
|
1174
1174
|
emitContentError: boolean;
|
|
1175
|
-
/**
|
|
1176
|
-
* Enable a lazy-loaded Prosemirror DevTools integration.
|
|
1177
|
-
*
|
|
1178
|
-
* Requires having the `prosemirror-dev-toolkit` npm package installed.
|
|
1179
|
-
* @type boolean
|
|
1180
|
-
* @default false
|
|
1181
|
-
* @example
|
|
1182
|
-
* ```js
|
|
1183
|
-
* enableDevTools: true
|
|
1184
|
-
* ```
|
|
1185
|
-
*/
|
|
1186
|
-
enableDevTools: boolean;
|
|
1187
1175
|
/**
|
|
1188
1176
|
* Called before the editor is constructed.
|
|
1189
1177
|
*/
|
|
@@ -2925,25 +2913,6 @@ declare class Editor extends EventEmitter<EditorEvents> {
|
|
|
2925
2913
|
* Remove the editor from the DOM, but still allow remounting at a different point in time
|
|
2926
2914
|
*/
|
|
2927
2915
|
unmount(): void;
|
|
2928
|
-
/**
|
|
2929
|
-
*
|
|
2930
|
-
* @returns
|
|
2931
|
-
*/
|
|
2932
|
-
/**
|
|
2933
|
-
* Applies ProseMirror dev tools to the editor instance if enabled and running in a browser environment.
|
|
2934
|
-
*
|
|
2935
|
-
* This method dynamically imports the `prosemirror-dev-toolkit` package and applies it to the current
|
|
2936
|
-
* editor view. If the dev tools are not installed, a warning is logged to the console.
|
|
2937
|
-
*
|
|
2938
|
-
* @private
|
|
2939
|
-
* @remarks
|
|
2940
|
-
* - Dev tools are only applied if `this.options.enableDevTools` is `true` and the code is running in a browser.
|
|
2941
|
-
* - If the editor view is not available, the dev tools are not applied.
|
|
2942
|
-
* - If the `prosemirror-dev-toolkit` package is missing, a warning is shown in the console.
|
|
2943
|
-
*
|
|
2944
|
-
* @returns {void}
|
|
2945
|
-
*/
|
|
2946
|
-
private applyDevTools;
|
|
2947
2916
|
/**
|
|
2948
2917
|
* Returns the editor storage.
|
|
2949
2918
|
*/
|
package/dist/index.d.ts
CHANGED
|
@@ -1172,18 +1172,6 @@ interface EditorOptions {
|
|
|
1172
1172
|
* @default false
|
|
1173
1173
|
*/
|
|
1174
1174
|
emitContentError: boolean;
|
|
1175
|
-
/**
|
|
1176
|
-
* Enable a lazy-loaded Prosemirror DevTools integration.
|
|
1177
|
-
*
|
|
1178
|
-
* Requires having the `prosemirror-dev-toolkit` npm package installed.
|
|
1179
|
-
* @type boolean
|
|
1180
|
-
* @default false
|
|
1181
|
-
* @example
|
|
1182
|
-
* ```js
|
|
1183
|
-
* enableDevTools: true
|
|
1184
|
-
* ```
|
|
1185
|
-
*/
|
|
1186
|
-
enableDevTools: boolean;
|
|
1187
1175
|
/**
|
|
1188
1176
|
* Called before the editor is constructed.
|
|
1189
1177
|
*/
|
|
@@ -2925,25 +2913,6 @@ declare class Editor extends EventEmitter<EditorEvents> {
|
|
|
2925
2913
|
* Remove the editor from the DOM, but still allow remounting at a different point in time
|
|
2926
2914
|
*/
|
|
2927
2915
|
unmount(): void;
|
|
2928
|
-
/**
|
|
2929
|
-
*
|
|
2930
|
-
* @returns
|
|
2931
|
-
*/
|
|
2932
|
-
/**
|
|
2933
|
-
* Applies ProseMirror dev tools to the editor instance if enabled and running in a browser environment.
|
|
2934
|
-
*
|
|
2935
|
-
* This method dynamically imports the `prosemirror-dev-toolkit` package and applies it to the current
|
|
2936
|
-
* editor view. If the dev tools are not installed, a warning is logged to the console.
|
|
2937
|
-
*
|
|
2938
|
-
* @private
|
|
2939
|
-
* @remarks
|
|
2940
|
-
* - Dev tools are only applied if `this.options.enableDevTools` is `true` and the code is running in a browser.
|
|
2941
|
-
* - If the editor view is not available, the dev tools are not applied.
|
|
2942
|
-
* - If the `prosemirror-dev-toolkit` package is missing, a warning is shown in the console.
|
|
2943
|
-
*
|
|
2944
|
-
* @returns {void}
|
|
2945
|
-
*/
|
|
2946
|
-
private applyDevTools;
|
|
2947
2916
|
/**
|
|
2948
2917
|
* Returns the editor storage.
|
|
2949
2918
|
*/
|
package/dist/index.js
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __export = (target, all) => {
|
|
3
|
+
for (var name in all)
|
|
4
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
5
|
+
};
|
|
4
6
|
|
|
5
7
|
// src/helpers/createChainableState.ts
|
|
6
8
|
function createChainableState(config) {
|
|
@@ -4300,7 +4302,6 @@ var Editor = class extends EventEmitter {
|
|
|
4300
4302
|
enablePasteRules: true,
|
|
4301
4303
|
enableCoreExtensions: true,
|
|
4302
4304
|
enableContentCheck: false,
|
|
4303
|
-
enableDevTools: false,
|
|
4304
4305
|
emitContentError: false,
|
|
4305
4306
|
onBeforeCreate: () => null,
|
|
4306
4307
|
onCreate: () => null,
|
|
@@ -4383,38 +4384,6 @@ var Editor = class extends EventEmitter {
|
|
|
4383
4384
|
(_a = this.css) == null ? void 0 : _a.remove();
|
|
4384
4385
|
this.css = null;
|
|
4385
4386
|
}
|
|
4386
|
-
/**
|
|
4387
|
-
*
|
|
4388
|
-
* @returns
|
|
4389
|
-
*/
|
|
4390
|
-
/**
|
|
4391
|
-
* Applies ProseMirror dev tools to the editor instance if enabled and running in a browser environment.
|
|
4392
|
-
*
|
|
4393
|
-
* This method dynamically imports the `prosemirror-dev-toolkit` package and applies it to the current
|
|
4394
|
-
* editor view. If the dev tools are not installed, a warning is logged to the console.
|
|
4395
|
-
*
|
|
4396
|
-
* @private
|
|
4397
|
-
* @remarks
|
|
4398
|
-
* - Dev tools are only applied if `this.options.enableDevTools` is `true` and the code is running in a browser.
|
|
4399
|
-
* - If the editor view is not available, the dev tools are not applied.
|
|
4400
|
-
* - If the `prosemirror-dev-toolkit` package is missing, a warning is shown in the console.
|
|
4401
|
-
*
|
|
4402
|
-
* @returns {void}
|
|
4403
|
-
*/
|
|
4404
|
-
applyDevTools() {
|
|
4405
|
-
if (typeof window === "undefined" || !this.options.enableDevTools) {
|
|
4406
|
-
return;
|
|
4407
|
-
}
|
|
4408
|
-
import("./dist-GJ4HMHO4.js").then(({ applyDevTools }) => {
|
|
4409
|
-
if (!this.editorView) {
|
|
4410
|
-
return;
|
|
4411
|
-
}
|
|
4412
|
-
applyDevTools(this.editorView);
|
|
4413
|
-
}).catch(() => {
|
|
4414
|
-
console.warn("[Tiptap warning]: Devtools are enabled but `prosemirror-dev-toolkit` is not installed.");
|
|
4415
|
-
console.warn("Install 'prosemirror-dev-toolkit' as a dev dependency to use the dev tools.");
|
|
4416
|
-
});
|
|
4417
|
-
}
|
|
4418
4387
|
/**
|
|
4419
4388
|
* Returns the editor storage.
|
|
4420
4389
|
*/
|
|
@@ -4652,9 +4621,6 @@ var Editor = class extends EventEmitter {
|
|
|
4652
4621
|
dispatchTransaction: this.dispatchTransaction.bind(this),
|
|
4653
4622
|
state: this.editorState
|
|
4654
4623
|
});
|
|
4655
|
-
if (this.options.enableDevTools) {
|
|
4656
|
-
this.applyDevTools();
|
|
4657
|
-
}
|
|
4658
4624
|
const newState = this.state.reconfigure({
|
|
4659
4625
|
plugins: this.extensionManager.plugins
|
|
4660
4626
|
});
|