Sublime like Multiple Cursors in HTML5

a 夏天 提交于 2019-12-12 11:16:21

问题


do you have an idea how to get the Sublime or Cloud 9 like Multiple Cursors functionality to the browser? Is there any jQuery Plugin to do it or has anyone the Idea? I want multiple cursors in a textera, maybe in multiple text areas. Should be possible with HTML5, but didn't find anything in the web!

Thank you!


回答1:


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.



来源:https://stackoverflow.com/questions/16690433/sublime-like-multiple-cursors-in-html5

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!