Skip to content

Instantly share code, notes, and snippets.

@devudit
Last active November 22, 2017 06:27
Show Gist options
  • Select an option

  • Save devudit/f548993122b4c987d77b9354cd3d28d0 to your computer and use it in GitHub Desktop.

Select an option

Save devudit/f548993122b4c987d77b9354cd3d28d0 to your computer and use it in GitHub Desktop.
Run code before and after CkEditor Initilize
<textarea name="editor"></textarea>
/*
* Will only work if called before 'replace'
* because after 'replace' the instance of the editor
* would have already been created and this won't run
*/
CKEDITOR.on("instanceCreated", function(event) {
alert('Editor instance created');
});
CKEDITOR.replace( 'editor');
CKEDITOR.on("instanceReady", function(event) {
alert('Editor instance ready');
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment