在单个或多个textareas和文本框中使用多个插入符号 [英] Using multiple carets in single or multiple textareas and textboxes

查看:292
本文介绍了在单个或多个textareas和文本框中使用多个插入符号的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想我可能已经知道这个问题的答案了,但是......



是否可以在单个文本框中有两个插入符,或者有两个单独的文本框同时集中注意力让用户可以同时打字?



我知道你可以通过添加一个keydown侦听器并使它们的值匹配来模拟这个,但是我希望在这两个字段中都可见的插入符。



如果没有,有没有人有任何想法如何模拟此?

解决方案

Ace编辑器支持多种cursors / carets like Sublime Text:



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


$ b Ctrl + 点击(或 Cmd(⌘) kbd> + 在OS X上点击),以获得多个游标并输入!

一堆代码并使用 Tab 缩小标签空间,或 Shift + Tab 缩小标签空间。


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?

解决方案

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.

这篇关于在单个或多个textareas和文本框中使用多个插入符号的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆