我正在尝试在 Shadow-dom 中实现自定义文本编辑器功能。我需要获取 contenteditable div 内的当前光标位置。
我已经尝试过几种方法。但他们都没有给出所需的输出。
javascript shadow-dom
javascript ×1
shadow-dom ×1