striven-editor

Maintained and contributed to an open source WYSIWYG editor as an internship project that made it to production and was adopted by the company I was working at.
git clone https://unitehenry.com/git/striven-editor.git
Log | Files | Refs | README | LICENSE

commit cc7ef1034d29b05aeeb5bd1e182bd50e3bbcc367
parent 8fd3ad3cf9ea5e971ab46352247141dc89d3f0bd
Author: unitehenry <unitehenry@gmail.com>
Date:   Wed, 23 Sep 2020 16:25:13 -0400

tab focus with content

Diffstat:
Msrc/striveneditor.js | 7+++++++
1 file changed, 7 insertions(+), 0 deletions(-)

diff --git a/src/striveneditor.js b/src/striveneditor.js @@ -1135,6 +1135,13 @@ export default class StrivenEditor { selNode.remove(); }, 0); + } else { + const r = se.getRange(); + + if(se.body.textContent && r) { + r.selectNodeContents(se.body); + r.collapse(); + } } }