diff --git a/src/editor/index.js b/src/editor/index.js index 212e2365a..a8293035d 100644 --- a/src/editor/index.js +++ b/src/editor/index.js @@ -629,6 +629,17 @@ module.exports = config => { return this; }, + /** + * Attach event and detach it after the first run + * @param {string} event Event name + * @param {Function} callback Callback function + * @return {this} + */ + once(event, callback) { + em.once(event, callback); + return this; + }, + /** * Detach event * @param {string} event Event name