diff --git a/docs/api/editor.md b/docs/api/editor.md index 98dc6206a..abd42ee9f 100644 --- a/docs/api/editor.md +++ b/docs/api/editor.md @@ -719,6 +719,23 @@ Render editor Returns **[HTMLElement][13]** +## onReady + +Trigger a callback once the editor is loaded and rendered. +The callback will be executed immediately if the method is called on the already rendered editor. + +### Parameters + +* `clb` **[Function][14]** Callback to trigger + +### Examples + +```javascript +editor.onReady(() => { + // perform actions +}); +``` + ## html Print safe HTML by using ES6 tagged template strings. diff --git a/src/editor/index.js b/src/editor/index.js index 6bd7723b3..1b1ec0550 100644 --- a/src/editor/index.js +++ b/src/editor/index.js @@ -731,7 +731,7 @@ export default (config = {}) => { /** * Trigger a callback once the editor is loaded and rendered. * The callback will be executed immediately if the method is called on the already rendered editor. - * @param {Function} clb Event to trigger + * @param {Function} clb Callback to trigger * @example * editor.onReady(() => { * // perform actions