Skip to content

Commit 684c7fa

Browse files
Merge pull request #57 from tinymce/feature/INT-2957
INT-2957: manage attribute `id`
2 parents 9b1ad6a + 561fcdb commit 684c7fa

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
66

77
## Unreleased
88

9+
### Fixed
10+
- The `id` attribute was not being used as the id for the editor.
11+
912
## 2.0.2 - 2023-03-27
1013

1114
### Fixed

src/main/ts/component/Editor.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -230,6 +230,10 @@ class TinyMceEditor extends HTMLElement {
230230
// load
231231
const target = document.createElement('textarea');
232232
target.value = this.textContent ?? '';
233+
const attrId = this.attributes.getNamedItem('id')?.value;
234+
if (attrId) {
235+
target.id = attrId;
236+
}
233237
if (this.placeholder !== null) {
234238
target.placeholder = this.placeholder;
235239
}

0 commit comments

Comments
 (0)