Select a column in the text area

Does anyone know how to enable the selection of columns in a text box. I absolutely do not know how, after a long Google search. Very new for javascript, html and css.

I would like to do this so that you can simply select c below and not a or b and perform functions such as copy and paste, just like selecting columns works in notepad ++, but replacing text selection is fine, instead holding the alt key. I use monospace typing.

 bab bcb bcb bcb bab 

Any help whatsoever, even just pointing me in the right direction would be greatly appreciated, thanks

+4
source share
1 answer

The Ace editor does this using multiple cursors. ( Click here to see a demo, and hold Alt while choosing.) It's not trivial to implement, but close to trivial, add the Ace editor to your site.

You can see the pull-request that added this function with interesting bits here , here , here , and here . It looks like there will be about 1000 lines of code for this function.

+1
source

Source: https://habr.com/ru/post/1501980/


All Articles