Created
June 26, 2016 07:43
-
-
Save andrey-str/00db62a516b89baf5afe9e8665bd6bd7 to your computer and use it in GitHub Desktop.
Hide/show CKEditor toolbar on focus events
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
subscribeToEditorHideEvents = (id) -> | |
CKEDITOR.instances[id].on 'instanceReady', (e) -> | |
$('#cke_' + id + " [id$='_top']").hide() | |
$('#cke_' + id + " [id$='_bottom']").hide() | |
@on 'focus', -> | |
$('#cke_' + id + " [id$='_top']").show() | |
$('#cke_' + id + " [id$='_bottom']").show() | |
return | |
@on 'blur', -> | |
$('#cke_' + id + " [id$='_top']").hide() | |
$('#cke_' + id + " [id$='_bottom']").hide() | |
return | |
return |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
From here: http://ckeditor.com/forums/Support/Toggle-toolbar-focusblur