如题!
<div class="content" contenteditable="true"></div>
1
ysc3839 Dec 29, 2020 via Android |
2
heroes3top Dec 29, 2020
中文输入有其他唤起输入法的控件吗 = =
|
3
shintendo Dec 29, 2020
各种富文本编辑器控件都是用这个做的
|
4
CismonX Dec 29, 2020 via iPhone
我第一反应是用 canvas 😐
|
5
JinTianYi456 Dec 29, 2020
我上个月知道吧 [doge]
|
6
westoy Dec 29, 2020
wysiwyg 编辑器都是基于这个的
|
7
AV1 Dec 29, 2020
contenteditable="true"
富文本编辑都是用这个实现的。 你甚至可以把它加载 style 标签上。 |
8
autoxbc Dec 29, 2020
原生控件有 onchange 和 oninput 事件,自己搞的就没了
|
11
AV1 Dec 29, 2020 @youla
<body> <style contenteditable style="display: block;"> .test { color: #f00; } </style> <div class="test"> text </div> </body> |
14
nortonlai Dec 29, 2020 via Android
大开眼界
|
15
TargaryenChen Dec 30, 2020
一些 web 上的 editor 组件就用的 contenteditable 实现的,例如 quill editor 。
|
16
SpencerCoding Dec 30, 2020
<div contenteditable="true">I'm Editable. Edit me!</div>
|