Hello everyone,
I want to have external button, which would trigger custom CKEDITOR plugin - this part works, as long as ckeditor area is visible in browser.
My button has ID: mainphoto, and the code looks like this:
$('#mainphoto').on('click', function(event) {
event.preventDefault();
var instanceName = 'mainphoto_text'; // the HTML id configured for editor
var editor = CKEDITOR.instances[instanceName];
editor.execCommand('photobankssingle');
});
but after I add the `display:none` attribute - my custom external button stops working, I get JS error: TypeError: CKEDITOR.currentInstance is undefined.
But when I remove `display: none;` option from div holdng the ckeditor (even using firebug), my external button starts to work right away.
Anyone has ideas? Because I'm fighting this nd day with the internet help but no luck...
Thank you
Any advice would be greatly
Any advice would be greatly appreciated.
Can't find any working solution..
Even ideas are greatly appreciated. Because I'm lost on how to achieve this...
Solved via:
Solved via:
position: absolute; top:-10000px;left: -10000px;