AviFS / md-editor

WIP - Sleek md editor where you get to define the markup

Home Page:https://avifs.github.io/md-editor/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Content editable div badly behaved

AviFS opened this issue · comments

Setting:

$('input').innerHTML = out;

has the cursor keep jumping to the beginning.

There are a lot of fixes on SO for this, but they make spaces act like <br> newlines for some reason.

So

$('input').innerHTML = out;
// SO accepted and highly voted function here
setCursorToEndContentEditable($('input'));

is also not working at all, but with a totally different issue. At least, not for the two answers I've tried.