Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Using multiple carets in single or multiple textareas and textboxes

I think I may already know the answer to this one but...

Is it possible to have two carets in a single textbox, or have two separate textboxes focused at the same time allowing the user to type into both symataniously?

I know you can simulate this by adding a keydown listener and making their values match, but I want the visible caret in both fields.

If not, does anyone have any ideas on how to simulate this?

like image 869
lededje Avatar asked Jul 11 '13 11:07

lededje


1 Answers

Ace editor supports multiple cursors/carets like Sublime Text:

http://ajaxorg.github.io/ace/

Ctrl+Click (or Cmd(⌘)+Click on OS X) in the live demo on that page to get multiple cursors and type away!

You can also select a bunch of code and use Tab to indent a tab space, or Shift+Tab to outdent a tab space.

like image 198
Sly_cardinal Avatar answered Sep 19 '22 07:09

Sly_cardinal