Select All Text contentEditable
<div style="border:solid 1px #D31444"
contenteditable="true"
onclick="document.execCommand('selectAll', false, null)">some text...</div>
When clicking on an editable node, select all existing text…
Quick test version…
document.body.innerHTML += `
<div id="el" style="border:solid 1px #D31444"
contenteditable="true">some text...</div>`
el.addEventListener('click', () => {
document.execCommand('selectAll', false, null)
})