user2409234
user2409234

Reputation: 111

Sublime like Multiple Cursors in HTML5

Do you have an idea how to get the Sublime or Cloud 9 like Multiple Cursors functionality to the browser?

I want multiple cursors in a textarea, maybe in multiple text areas. Should be possible with HTML5, but didn't find anything in the web!

Thank you!

Upvotes: 11

Views: 4258

Answers (1)

Alvaro Pinot
Alvaro Pinot

Reputation: 271

As barlop said ace editor has multiple cursors, if you want to take a look to its magic you could maybe take a look to multi_select.js at aces github repo.

In order to give you a little idea on how to do it, there's no textarea except under the main cursor. Ace breaks down text into multiple divs with the appeareance of a big textarea. When you place multiple cursors, ace copies the text entered in the main cursor to the other spans or divs.

Upvotes: 6

Related Questions