pier-oliviert / ecrire

Blog engine for developers

Home Page:http://ecrire.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

pasting code when inside a child node breaks the cursor position

pier-oliviert opened this issue · comments

For example, if I copy a url inside a link tag in the editor, if the link tag is parsed (already exists), the cursor will jump because the algorithm to position the cursor only checks for direct children of the line.

Basically the Cursor object should have a recursive method that look at the node type and dig down until it finds the corresponding textNode to set the cursor.