diff --git a/service.js b/service.js index adf7e56..dded9ca 100644 --- a/service.js +++ b/service.js @@ -758,6 +758,7 @@ class BesTAService { lines.forEach(line => { const divEl = document.createElement('div') divEl.textContent = line + if (line === '') divEl.innerHTML = ' ' this.cloneDiv.appendChild(divEl) }) this.cloneDiv.dispatchEvent(customEvent) @@ -787,7 +788,7 @@ class BesTAService { /** * This function handles the replacement of the text in the textarea element * - * @param {HTMLElement} el Element to replace the text in + * @param {HTMLElement} el Element whose outerText will be used as a replacement */ handleReplacement(el) { // TODO: think of a way to reposition the cursor after the replacement