@tiptap/core 3.8.0 → 3.9.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 +3 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +3 -2
- package/dist/index.js.map +1 -1
- package/package.json +3 -3
- package/src/Editor.ts +5 -2
package/dist/index.d.cts
CHANGED
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -4296,6 +4296,7 @@ var Editor = class extends EventEmitter {
|
|
|
4296
4296
|
constructor(options = {}) {
|
|
4297
4297
|
super();
|
|
4298
4298
|
this.css = null;
|
|
4299
|
+
this.className = "tiptap";
|
|
4299
4300
|
this.editorView = null;
|
|
4300
4301
|
this.isFocused = false;
|
|
4301
4302
|
/**
|
|
@@ -4408,7 +4409,7 @@ var Editor = class extends EventEmitter {
|
|
|
4408
4409
|
}
|
|
4409
4410
|
this.editorView = null;
|
|
4410
4411
|
this.isInitialized = false;
|
|
4411
|
-
if (this.css) {
|
|
4412
|
+
if (this.css && !document.querySelectorAll(`.${this.className}`).length) {
|
|
4412
4413
|
try {
|
|
4413
4414
|
if (typeof this.css.remove === "function") {
|
|
4414
4415
|
this.css.remove();
|
|
@@ -4689,7 +4690,7 @@ var Editor = class extends EventEmitter {
|
|
|
4689
4690
|
* Prepend class name to element.
|
|
4690
4691
|
*/
|
|
4691
4692
|
prependClass() {
|
|
4692
|
-
this.view.dom.className =
|
|
4693
|
+
this.view.dom.className = `${this.className} ${this.view.dom.className}`;
|
|
4693
4694
|
}
|
|
4694
4695
|
captureTransaction(fn) {
|
|
4695
4696
|
this.isCapturingTransaction = true;
|