@tiptap/core 3.0.0-beta.26 → 3.0.0-beta.28
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/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tiptap/core",
|
|
3
3
|
"description": "headless rich text editor",
|
|
4
|
-
"version": "3.0.0-beta.
|
|
4
|
+
"version": "3.0.0-beta.28",
|
|
5
5
|
"homepage": "https://tiptap.dev",
|
|
6
6
|
"keywords": [
|
|
7
7
|
"tiptap",
|
|
@@ -52,11 +52,10 @@
|
|
|
52
52
|
"jsx-dev-runtime"
|
|
53
53
|
],
|
|
54
54
|
"devDependencies": {
|
|
55
|
-
"
|
|
56
|
-
"@tiptap/pm": "3.0.0-beta.26"
|
|
55
|
+
"@tiptap/pm": "3.0.0-beta.28"
|
|
57
56
|
},
|
|
58
57
|
"peerDependencies": {
|
|
59
|
-
"@tiptap/pm": "3.0.0-beta.
|
|
58
|
+
"@tiptap/pm": "3.0.0-beta.28"
|
|
60
59
|
},
|
|
61
60
|
"repository": {
|
|
62
61
|
"type": "git",
|
package/src/Editor.ts
CHANGED
|
@@ -92,7 +92,6 @@ export class Editor extends EventEmitter<EditorEvents> {
|
|
|
92
92
|
enablePasteRules: true,
|
|
93
93
|
enableCoreExtensions: true,
|
|
94
94
|
enableContentCheck: false,
|
|
95
|
-
enableDevTools: false,
|
|
96
95
|
emitContentError: false,
|
|
97
96
|
onBeforeCreate: () => null,
|
|
98
97
|
onCreate: () => null,
|
|
@@ -187,43 +186,6 @@ export class Editor extends EventEmitter<EditorEvents> {
|
|
|
187
186
|
this.css = null
|
|
188
187
|
}
|
|
189
188
|
|
|
190
|
-
/**
|
|
191
|
-
*
|
|
192
|
-
* @returns
|
|
193
|
-
*/
|
|
194
|
-
/**
|
|
195
|
-
* Applies ProseMirror dev tools to the editor instance if enabled and running in a browser environment.
|
|
196
|
-
*
|
|
197
|
-
* This method dynamically imports the `prosemirror-dev-toolkit` package and applies it to the current
|
|
198
|
-
* editor view. If the dev tools are not installed, a warning is logged to the console.
|
|
199
|
-
*
|
|
200
|
-
* @private
|
|
201
|
-
* @remarks
|
|
202
|
-
* - Dev tools are only applied if `this.options.enableDevTools` is `true` and the code is running in a browser.
|
|
203
|
-
* - If the editor view is not available, the dev tools are not applied.
|
|
204
|
-
* - If the `prosemirror-dev-toolkit` package is missing, a warning is shown in the console.
|
|
205
|
-
*
|
|
206
|
-
* @returns {void}
|
|
207
|
-
*/
|
|
208
|
-
private applyDevTools(): void {
|
|
209
|
-
if (typeof window === 'undefined' || !this.options.enableDevTools) {
|
|
210
|
-
return
|
|
211
|
-
}
|
|
212
|
-
|
|
213
|
-
import('prosemirror-dev-toolkit')
|
|
214
|
-
.then(({ applyDevTools }) => {
|
|
215
|
-
if (!this.editorView) {
|
|
216
|
-
return
|
|
217
|
-
}
|
|
218
|
-
|
|
219
|
-
applyDevTools(this.editorView)
|
|
220
|
-
})
|
|
221
|
-
.catch(() => {
|
|
222
|
-
console.warn('[Tiptap warning]: Devtools are enabled but `prosemirror-dev-toolkit` is not installed.')
|
|
223
|
-
console.warn("Install 'prosemirror-dev-toolkit' as a dev dependency to use the dev tools.")
|
|
224
|
-
})
|
|
225
|
-
}
|
|
226
|
-
|
|
227
189
|
/**
|
|
228
190
|
* Returns the editor storage.
|
|
229
191
|
*/
|
|
@@ -527,11 +489,6 @@ export class Editor extends EventEmitter<EditorEvents> {
|
|
|
527
489
|
state: this.editorState,
|
|
528
490
|
})
|
|
529
491
|
|
|
530
|
-
// Apply dev tools if enabled
|
|
531
|
-
if (this.options.enableDevTools) {
|
|
532
|
-
this.applyDevTools()
|
|
533
|
-
}
|
|
534
|
-
|
|
535
492
|
// `editor.view` is not yet available at this time.
|
|
536
493
|
// Therefore we will add all plugins and node views directly afterwards.
|
|
537
494
|
const newState = this.state.reconfigure({
|
package/src/types.ts
CHANGED
|
@@ -363,18 +363,6 @@ export interface EditorOptions {
|
|
|
363
363
|
* @default false
|
|
364
364
|
*/
|
|
365
365
|
emitContentError: boolean
|
|
366
|
-
/**
|
|
367
|
-
* Enable a lazy-loaded Prosemirror DevTools integration.
|
|
368
|
-
*
|
|
369
|
-
* Requires having the `prosemirror-dev-toolkit` npm package installed.
|
|
370
|
-
* @type boolean
|
|
371
|
-
* @default false
|
|
372
|
-
* @example
|
|
373
|
-
* ```js
|
|
374
|
-
* enableDevTools: true
|
|
375
|
-
* ```
|
|
376
|
-
*/
|
|
377
|
-
enableDevTools: boolean
|
|
378
366
|
/**
|
|
379
367
|
* Called before the editor is constructed.
|
|
380
368
|
*/
|
package/dist/chunk-G3PMV62Z.js
DELETED
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
var __create = Object.create;
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
6
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
-
var __commonJS = (cb, mod) => function __require() {
|
|
8
|
-
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
|
|
9
|
-
};
|
|
10
|
-
var __export = (target, all) => {
|
|
11
|
-
for (var name in all)
|
|
12
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
13
|
-
};
|
|
14
|
-
var __copyProps = (to, from, except, desc) => {
|
|
15
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
16
|
-
for (let key of __getOwnPropNames(from))
|
|
17
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
18
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
19
|
-
}
|
|
20
|
-
return to;
|
|
21
|
-
};
|
|
22
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
23
|
-
// If the importer is in node compatibility mode or this is not an ESM
|
|
24
|
-
// file that has been converted to a CommonJS file using a Babel-
|
|
25
|
-
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
26
|
-
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
27
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
28
|
-
mod
|
|
29
|
-
));
|
|
30
|
-
|
|
31
|
-
export {
|
|
32
|
-
__commonJS,
|
|
33
|
-
__export,
|
|
34
|
-
__toESM
|
|
35
|
-
};
|
|
36
|
-
//# sourceMappingURL=chunk-G3PMV62Z.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|