Opened 16 years ago
Closed 16 years ago
#3173 closed New Feature (fixed)
Make it possible to register event listeners on instance creation
Reported by: | Frederico Caldeira Knabben | Owned by: | Frederico Caldeira Knabben |
---|---|---|---|
Priority: | Normal | Milestone: | CKEditor 3.0 |
Component: | General | Version: | |
Keywords: | Confirmed Review+ | Cc: |
Description
The following currently doesn't work in all cases:
var editor = editor.replace( 'editor1' ); editor.on( 'someEvent', function() { ... } );
... because the event may be fired during the "replace" call, so the event registration comes too late.
There are ways to do so, but it's a little cumbersome:
CKEDITOR.on( 'instanceCreated', function( ev ) { ev.editor.on( 'someEvent', function() { ... } ); }); editor.replace( 'editor1' );
There should be instead a way to do that on instance creation, just like this:
editor.replace( 'editor1', { // ... some editor settings on : { someEvent : function() { ... }, otherEvent : function() { ... } } });
Attachments (1)
Change History (4)
Changed 16 years ago by
Attachment: | 3173.patch added |
---|
comment:1 Changed 16 years ago by
Keywords: | Review? added |
---|---|
Status: | new → assigned |
comment:2 Changed 16 years ago by
Keywords: | Review+ added; Review? removed |
---|
comment:3 Changed 16 years ago by
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
Fixed with [3267].