Grammalecte  Diff

Differences From Artifact [38a6beab10]:

To Artifact [1c3cef7a06]:


1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030




1031
1032
1033
1034
        while (this.xNode.firstChild) {
            this.xNode.removeChild(this.xNode.firstChild);
        }
    }

    write () {
        if (this.xNode !== null) {
            let sText = "";
            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"));
                });




            }
        }
    }
}







<








>
>
>
>




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);
            }
        }
    }
}