最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

javascript - Sublime like Multiple Cursors in HTML5 - Stack Overflow

programmeradmin5浏览0评论

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!

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!

Share Improve this question edited Dec 29, 2021 at 13:10 General Grievance 5,04338 gold badges37 silver badges56 bronze badges asked May 22, 2013 at 11:20 user2409234user2409234 1111 silver badge3 bronze badges 2
  • dunno if this does it stackoverflow./questions/17592627/… – barlop Commented Nov 5, 2013 at 23:46
  • that stackoverflow link mentions ajaxorg.github.io/ace/#nav=about which is open source and written in javascript, so the "secret" should be there! – barlop Commented Nov 5, 2013 at 23:48
Add a ment  | 

1 Answer 1

Reset to default 6

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.

发布评论

评论列表(0)

  1. 暂无评论