lo folks,
I tried to find it with google.
I am using a CKEditor instance on my homepage and I would like to trigger a javascript function as soon as the user enter the instance.
Is there a way like onfocus-events for textareas?
sincerly
H_arald
I tried to find it with google.
I am using a CKEditor instance on my homepage and I would like to trigger a javascript function as soon as the user enter the instance.
Is there a way like onfocus-events for textareas?
sincerly
H_arald

Re: How do I define a on focus Funktion?
CKEDITOR.instances.editor_name.document.on('focus', function(event) { // your instructions });Re: How do I define a on focus Funktion?
regards
H_arald
Re: How do I define a on focus Funktion?
where I have to place this?
I write this in my function.js
CKEDITOR.instances.dynContent1.document.on('focus', function(event) { // your instructions alert('alert'); });But the alert doesn't pop up when the instance get focus.
I tried also
CKEDITOR.add = function( editor ) { editor.on( 'focus', function(){ alert('alert'); }); };In this way the function fire, but following function don' work.
function insertCK(editor, tag) { var oEditor = CKEDITOR.instances[editor]; oEditor.insertHtml(tag); }Without CKEDITOR.add insertCK() works fine.
How can I reach, that both works (onfocus and inserCK())?
Thanks
Ngar
[edit]
I have to insert in the CKEDITOR.add-function.
[/edit]