From 464d0f89b5490ba46e207825fea6244ff22fa0f6 Mon Sep 17 00:00:00 2001 From: e11sy <130844513+e11sy@users.noreply.github.com> Date: Wed, 9 Oct 2024 20:59:46 +0300 Subject: [PATCH 1/2] fix caret loss on merge --- src/index.ts | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/src/index.ts b/src/index.ts index 506312c..e36face 100644 --- a/src/index.ts +++ b/src/index.ts @@ -215,12 +215,7 @@ export default class Header { * @public */ merge(data: HeaderData): void { - const newData = { - text: this.data.text + data.text, - level: this.data.level, - }; - - this.data = newData; + this._element.insertAdjacentHTML('beforeend', data.text) } /** From 4df5def34ccb55e7a268bb6d41181e78bdefa656 Mon Sep 17 00:00:00 2001 From: e11sy <130844513+e11sy@users.noreply.github.com> Date: Wed, 9 Oct 2024 21:02:01 +0300 Subject: [PATCH 2/2] bump version --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 9101807..2a928c5 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@editorjs/header", - "version": "2.8.7", + "version": "2.8.8", "keywords": [ "codex editor", "header",