开发者

OnEdit / OnFocus Hook or Similar in Bespin Embedded?

I'm trying to implement a hook when text is edited in a bespin开发者_StackOverflow embedded instance. Ideally, I'd simply like to know when the instance has gained or lost focus to capture the user action.


Not sure when you last checked out bespin but in the newer releases there is a textChanged event you can subscribe to:

editor.textChanged .add(function((oldRange, newRange, newText)) {
    console.log('textChanged', JSON.stringify(newText));
});
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜