madebymany / sir-trevor-js

Rich content editing entirely re-imagined for the web
http://madebymany.github.io/sir-trevor-js/
MIT License
4.51k stars 399 forks source link

Allow cursor traversal between blocks. #171

Closed anilgulecha closed 5 years ago

anilgulecha commented 10 years ago

I'd like to use STjs to edit long documents. (most other RTEs are not an option as they do not maintain model/view separately).

Moving with mouse between blocks is very cumbersome. Would it be possible to add options {allowCursorNext:, allowCursorPrevious:} to each block, so when the cursor is at the last and first line respective, the focus, and cursor placement move to the next/previous block automatically.

This will enable a very keyboard friendly UX.

Thank's for a very cool plugin. I'm happy to answer any queries you may have.

ninjabiscuit commented 10 years ago

Hi. Great suggestion. Keyboard navigation is definitely on the roadmap. At the very least I'd like to see the ability to move between the blocks with the tab button.

anilgulecha commented 10 years ago

May I suggest sticking with up/down keys? It's what everyone is familiar with -- day in and day out, on any platform. Tab will be (a little) jarring.

(of course using tab as a faux-page down would be fine. I was specifically talking about line behavior for the cursor.)

ilyatulvio commented 10 years ago

I like this idea. Philosophically, it sort of fits in with some of the talk about decluttering the "between block" controls as well.

codeincontext commented 10 years ago

When I get some time I'd love to take this on

ninjabiscuit commented 10 years ago

@skattyadz Yeah, would love you to take this on! :+1:

andflett commented 10 years ago

:thumbsup:

On Friday, 4 April 2014 at 10:36, Andrew Walker wrote:

Yeah, would love you to take this on!

— Reply to this email directly or view it on GitHub (https://github.com/madebymany/sir-trevor-js/issues/171#issuecomment-39547319).

johnnybenson commented 10 years ago

:+1: being able to click and drag to select text across multiple blocks is huge