From 384e3ea5c3bc729f694a0583ca2e7c99fefc3525 Mon Sep 17 00:00:00 2001 From: lorenzo-pomili Date: Tue, 19 Dec 2023 09:10:05 +0100 Subject: [PATCH 1/3] INT-2957: manage attribute `id` --- src/main/ts/component/Editor.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/main/ts/component/Editor.ts b/src/main/ts/component/Editor.ts index 67a37a9..b71060a 100644 --- a/src/main/ts/component/Editor.ts +++ b/src/main/ts/component/Editor.ts @@ -230,6 +230,10 @@ class TinyMceEditor extends HTMLElement { // load const target = document.createElement('textarea'); target.value = this.textContent ?? ''; + const attrId = this.attributes.getNamedItem('id')?.value; + if (attrId) { + target.id = attrId; + } if (this.placeholder !== null) { target.placeholder = this.placeholder; } From 16d6c154903f7efdf4130217ad4cfa81c9dc5a66 Mon Sep 17 00:00:00 2001 From: lorenzo-pomili Date: Wed, 20 Dec 2023 08:12:26 +0100 Subject: [PATCH 2/3] INT-2957: add changelog entry --- CHANGELOG.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 19f9236..10b4459 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## Unreleased +### Fixed +- Now the `id` attribute is correclty managed + ## 2.0.2 - 2023-03-27 ### Fixed From 561fcdb75d342cefe67f1c5beb3d101abfd2bd2b Mon Sep 17 00:00:00 2001 From: lorenzo-pomili Date: Mon, 8 Jan 2024 14:24:12 +0100 Subject: [PATCH 3/3] INT-2957: fix changelog entry --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 10b4459..56b3a7b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,7 +7,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## Unreleased ### Fixed -- Now the `id` attribute is correclty managed +- The `id` attribute was not being used as the id for the editor. ## 2.0.2 - 2023-03-27