Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
当在 bespin 嵌入式实例中编辑文本时,我正在尝试实现一个钩子。理想情况下,我只想知道实例何时获得或失去焦点以捕获用户操作。
不确定您上次签出 bespin 的时间,但在较新的版本中,您可以订阅一个 textChanged 事件:
editor.textChanged .add(function((oldRange, newRange, newText)) { console.log('textChanged', JSON.stringify(newText)); });