@tiptap/core 3.1.0 → 3.2.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/index.cjs +11 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +11 -2
- package/dist/index.js.map +1 -1
- package/package.json +3 -3
- package/src/Editor.ts +14 -1
package/dist/index.js
CHANGED
|
@@ -4371,7 +4371,6 @@ var Editor = class extends EventEmitter {
|
|
|
4371
4371
|
* Remove the editor from the DOM, but still allow remounting at a different point in time
|
|
4372
4372
|
*/
|
|
4373
4373
|
unmount() {
|
|
4374
|
-
var _a;
|
|
4375
4374
|
if (this.editorView) {
|
|
4376
4375
|
const dom = this.editorView.dom;
|
|
4377
4376
|
if (dom == null ? void 0 : dom.editor) {
|
|
@@ -4381,7 +4380,17 @@ var Editor = class extends EventEmitter {
|
|
|
4381
4380
|
}
|
|
4382
4381
|
this.editorView = null;
|
|
4383
4382
|
this.isInitialized = false;
|
|
4384
|
-
(
|
|
4383
|
+
if (this.css) {
|
|
4384
|
+
try {
|
|
4385
|
+
if (typeof this.css.remove === "function") {
|
|
4386
|
+
this.css.remove();
|
|
4387
|
+
} else if (this.css.parentNode) {
|
|
4388
|
+
this.css.parentNode.removeChild(this.css);
|
|
4389
|
+
}
|
|
4390
|
+
} catch (error) {
|
|
4391
|
+
console.warn("Failed to remove CSS element:", error);
|
|
4392
|
+
}
|
|
4393
|
+
}
|
|
4385
4394
|
this.css = null;
|
|
4386
4395
|
}
|
|
4387
4396
|
/**
|