diff --git a/app/javascript/editor/editor.js b/app/javascript/editor/editor.js index 24c0f346..92ae14dd 100644 --- a/app/javascript/editor/editor.js +++ b/app/javascript/editor/editor.js @@ -271,6 +271,8 @@ const cleanContent = (contentEl) => { const el = document.createElement("p") contentEl.insertBefore(el, child.nextSibling) el.appendChild(child) + + sel.collapse(el, el.textContent.length) } } }