Skip to content
This repository was archived by the owner on Apr 4, 2019. It is now read-only.

undo should sometimes select a range #16

Open
matthewmueller opened this issue Jan 6, 2014 · 2 comments
Open

undo should sometimes select a range #16

matthewmueller opened this issue Jan 6, 2014 · 2 comments

Comments

@matthewmueller
Copy link

Undo is a little bit funky and not like other editors

steps:

  1. select a word
  2. hit bold
  3. unselect (click at end of word)
  4. undo

editors like google docs select the range you bolded, while editable will just place the cursor at the end.

@bmcmahen
Copy link
Contributor

Yeah, I remember messing around with this at some point and re-implementing the undo/redo system so that it reselects previous selections. I can see if I can put together a decent PR at some point.

@yields
Copy link
Owner

yields commented Jan 29, 2014

yea, there are two choices with contenteditable either let the browser manage undo history or manage it yourself.

i decided to manage it myself, the reason being that i wanted a way to manipulate it like grab history from the server etc..

undo works but yea it's kinda funky, google-docs works well because they created their own layout engine.

(btw let me know if you want to go crazy and create a layout engine, i will join you ;)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants