Overview
| Comment: | [fx] create custom event on text area when Grammalecte change the text content |
|---|---|
| Downloads: | Tarball | ZIP archive | SQL archive |
| Timelines: | family | ancestors | descendants | both | trunk | fx |
| Files: | files | file ages | folders |
| SHA3-256: |
65c3b076ec087b3cb49e2c981e3badbe |
| User & Date: | olr on 2020-03-04 14:15:35 |
| Other Links: | manifest | tags |
Context
|
2020-03-05
| ||
| 19:07 | [cli][server][graphspell][core] interactive correction with CLI check-in: c8ad079d57 user: olr tags: trunk, cli, core, server, graphspell | |
|
2020-03-04
| ||
| 14:15 | [fx] create custom event on text area when Grammalecte change the text content check-in: 65c3b076ec user: olr tags: trunk, fx | |
| 13:50 | [fr] ajustements check-in: e65aa598d3 user: olr tags: trunk, fr | |
Changes
Modified gc_lang/fr/webext/content_scripts/panel_gc.js from [38a6beab10] to [1c3cef7a06].
| ︙ | ︙ | |||
1015 1016 1017 1018 1019 1020 1021 |
while (this.xNode.firstChild) {
this.xNode.removeChild(this.xNode.firstChild);
}
}
write () {
if (this.xNode !== null) {
| < > > > > | 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 |
while (this.xNode.firstChild) {
this.xNode.removeChild(this.xNode.firstChild);
}
}
write () {
if (this.xNode !== null) {
if (this.bTextArea) {
this.xNode.value = this.getText();
} else {
this.eraseNodeContent();
this.dParagraph.forEach((val, key) => {
this.xNode.appendChild(document.createTextNode(val.normalize("NFC")));
this.xNode.appendChild(document.createElement("br"));
});
const xEvent = new CustomEvent("grammalecteNodeContentUpdated", {
detail: { text: [...this.dParagraph.values()].join("\n").normalize("NFC") }
});
this.xNode.dispatchEvent(xEvent);
}
}
}
}
|