Created
August 10, 2014 12:50
-
-
Save shirashin/4e02da4a903ad022533b to your computer and use it in GitHub Desktop.
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
| timelinesListApp.directive 'ckeditor', -> | |
| require: '?ngModel' | |
| link: (scope, elm, attr, ngModel)-> | |
| ck = CKEDITOR.instances[elm[0].id] | |
| unless ngModel then return | |
| ck.on 'pasteState', -> | |
| scope.$apply -> | |
| ngModel.$setViewValue ck.getData() | |
| ngModel.$render = (value)-> ck.setData ngModel.$viewValue |
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
| CKEDITOR.replace 'content', | |
| customConfig: 'config/post_timeline.js', | |
| on: | |
| loaded: (ev) -> | |
| $('#cke_1_top').hide() | |
| instanceReady: (ev) -> | |
| ev.editor.on 'focus', (ev) -> | |
| $('#cke_1_top').show() | |
| ev.editor.resize(472, 100, true) | |
| ev.editor.on 'blur', (ev) -> | |
| $('#cke_1_top').hide() | |
| ev.editor.resize(472, 36, true) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment