var element = CKEDITOR.document.getById( 'myElement' );
element.on( 'click', function( ev ) {
someFunction();
});
var element = CKEDITOR.document.getById( 'myElement' );
element.on( 'click', function( ev )
{
// Prevent the click to chave any effect in the element.
ev.data.preventDefault();
});
var element = CKEDITOR.document.getById( 'myElement' );
element.on( 'click', function( ev ) {
ev.removeListener();
someFunction();
});
I am trying to implement your solution for the main text area when the user clicks within it. However I need to find the
'myElement'
name. What is the id of the main text area for the control. When I try this using the name of the control, mine is CKEditor1, I am not getting a click event. The following is my control defined in the markup.
Re: capture onclick event handler to CKEditor textarea
var element = CKEDITOR.document.getById( 'myElement' ); element.on( 'click', function( ev ) { someFunction(); });var element = CKEDITOR.document.getById( 'myElement' ); element.on( 'click', function( ev ) { // Prevent the click to chave any effect in the element. ev.data.preventDefault(); });var element = CKEDITOR.document.getById( 'myElement' ); element.on( 'click', function( ev ) { ev.removeListener(); someFunction(); });I am trying to implement your
I am trying to implement your solution for the main text area when the user clicks within it. However I need to find the
name. What is the id of the main text area for the control. When I try this using the name of the control, mine is CKEditor1, I am not getting a click event. The following is my control defined in the markup.