Overview
Comment: | [tb][fx] editor & text formatter: update for MailExtension |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | tb | fx | mailext |
Files: | files | file ages | folders |
SHA3-256: |
4553dac0b4ed1973fe51fdd754de4ad4 |
User & Date: | olr on 2020-07-09 14:56:38 |
Other Links: | branch diff | manifest | tags |
Context
2020-07-09
| ||
15:01 | [tb][fx] don’t show clipboard button for MailExtension check-in: 9195e062fb user: olr tags: tb, fx, mailext | |
14:56 | [tb][fx] editor & text formatter: update for MailExtension check-in: 4553dac0b4 user: olr tags: tb, fx, mailext | |
13:07 | [tb][fx] adapt conjugueur to MailExtension -> no input allowed in compose scripts check-in: 53f7b50983 user: olr tags: tb, fx, mailext | |
Changes
Modified gc_lang/fr/webext/content_scripts/editor.js from [4bcac7be9b] to [4d321e586a].
︙ | ︙ | |||
65 66 67 68 69 70 71 | getText () { try { let sPageText = ""; for (let [i, sLine] of this.getParagraphs()) { sPageText += sLine + "\n"; } | | > | > > > > > > > > | 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 | getText () { try { let sPageText = ""; for (let [i, sLine] of this.getParagraphs()) { sPageText += sLine + "\n"; } return sPageText.slice(0,-1).normalize("NFC"); } catch (e) { showError(e); } } getParagraph (iPara) { try { return this.lNode[iPara].textContent; } catch (e) { showError(e); } } setParagraph (iPara, sText) { try { if (iPara < this.lNode.length) { this.lNode[iPara].textContent = oGrammalecte.purgeText(sText).normalize("NFC"); } } catch (e) { showError(e); } } changeParagraph (iPara, sModif, iStart, iEnd) { let sText = this.getParagraph(iPara); this.writeParagraph(iPara, sText.slice(0, iStart) + sModif + sText.slice(iEnd)); } loadText (sText) { let lParagraphs = sText.split("\n"); for (let iPara = 0; iPara < lParagraphs.length; iPara++) { this.setParagraph(iPara, lParagraphs[iPara]); } } clear () { this.xDocument = null; this.xRootNode = null; this.lNode.length = 0; } } |
︙ | ︙ | |||
187 188 189 190 191 192 193 | } getText () { return [...this.dParagraph.values()].join("\n").normalize("NFC"); } setParagraph (iParagraph, sText) { | | | 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 | } getText () { return [...this.dParagraph.values()].join("\n").normalize("NFC"); } setParagraph (iParagraph, sText) { this.dParagraph.set(iParagraph, oGrammalecte.purgeText(sText).normalize("NFC")); this.write(); } getParagraph (iParaNum) { return this.dParagraph.get(iParaNum); } |
︙ | ︙ |