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));
});
精彩评论