@tiptap/core 2.7.2 → 2.7.4
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 +7 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +7 -0
- package/dist/index.js.map +1 -1
- package/dist/index.umd.js +7 -0
- package/dist/index.umd.js.map +1 -1
- package/dist/packages/core/src/ExtensionManager.d.ts +2 -1
- package/dist/packages/core/src/types.d.ts +4 -7
- package/package.json +2 -2
- package/src/Editor.ts +7 -0
- package/src/ExtensionManager.ts +1 -1
- package/src/helpers/getRenderedAttributes.ts +3 -0
- package/src/types.ts +24 -16
package/dist/index.cjs
CHANGED
|
@@ -344,6 +344,7 @@ function mergeAttributes(...objects) {
|
|
|
344
344
|
|
|
345
345
|
function getRenderedAttributes(nodeOrMark, extensionAttributes) {
|
|
346
346
|
return extensionAttributes
|
|
347
|
+
.filter(attribute => attribute.type === nodeOrMark.type.name)
|
|
347
348
|
.filter(item => item.attribute.rendered)
|
|
348
349
|
.map(item => {
|
|
349
350
|
if (!item.attribute.renderHTML) {
|
|
@@ -4433,6 +4434,12 @@ class Editor extends EventEmitter {
|
|
|
4433
4434
|
destroy() {
|
|
4434
4435
|
this.emit('destroy');
|
|
4435
4436
|
if (this.view) {
|
|
4437
|
+
// Cleanup our reference to prevent circular references which caused memory leaks
|
|
4438
|
+
// @ts-ignore
|
|
4439
|
+
const dom = this.view.dom;
|
|
4440
|
+
if (dom && dom.editor) {
|
|
4441
|
+
delete dom.editor;
|
|
4442
|
+
}
|
|
4436
4443
|
this.view.destroy();
|
|
4437
4444
|
}
|
|
4438
4445
|
this.removeAllListeners();
|