@tiptap/core 2.1.0-rc.4 → 2.1.0-rc.5

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.
@@ -90,6 +90,10 @@ export declare class Editor extends EventEmitter<EditorEvents> {
90
90
  * Creates all node views.
91
91
  */
92
92
  createNodeViews(): void;
93
+ /**
94
+ * Prepend class name to element.
95
+ */
96
+ prependClass(): void;
93
97
  isCapturingTransaction: boolean;
94
98
  private capturedTransaction;
95
99
  captureTransaction(fn: Function): Transaction | null;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@tiptap/core",
3
3
  "description": "headless rich text editor",
4
- "version": "2.1.0-rc.4",
4
+ "version": "2.1.0-rc.5",
5
5
  "homepage": "https://tiptap.dev",
6
6
  "keywords": [
7
7
  "tiptap",
@@ -32,7 +32,7 @@
32
32
  "dist"
33
33
  ],
34
34
  "devDependencies": {
35
- "@tiptap/pm": "^2.1.0-rc.4"
35
+ "@tiptap/pm": "^2.1.0-rc.5"
36
36
  },
37
37
  "peerDependencies": {
38
38
  "@tiptap/pm": "^2.0.0"
package/src/Editor.ts CHANGED
@@ -281,6 +281,7 @@ export class Editor extends EventEmitter<EditorEvents> {
281
281
  this.view.updateState(newState)
282
282
 
283
283
  this.createNodeViews()
284
+ this.prependClass()
284
285
 
285
286
  // Let’s store the editor instance in the DOM element.
286
287
  // So we’ll have access to it for tests.
@@ -298,6 +299,13 @@ export class Editor extends EventEmitter<EditorEvents> {
298
299
  })
299
300
  }
300
301
 
302
+ /**
303
+ * Prepend class name to element.
304
+ */
305
+ public prependClass(): void {
306
+ this.view.dom.className = `tiptap ${this.view.dom.className}`
307
+ }
308
+
301
309
  public isCapturingTransaction = false
302
310
 
303
311
  private capturedTransaction: Transaction | null = null