I have a Javascript for tooltips and other things which work fine in front end but I want the same Javascript to run inside CKEditor too so that the user can see what he/she will get in the front end. I have successfully linked my custom CSS with CKEditor using function hook_ckeditor_css_alter which completes my half target but I didn't find any hooks for attaching custom Javascript.
Please share a tip or point me to any resource which may help in this regard. Thanks
CKEditor.scriptLoader
. I haven't personally used it so I can't help further I'm afraid