Changes between Version 3 and Version 11 of Ticket #13337


Ignore:
Timestamp:
Jun 10, 2015, 9:22:22 AM (4 years ago)
Author:
Piotrek Koszuliński
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #13337

    • Property Status changed from review to closed
    • Property Summary changed from Improve way of listening to events on widgets repo. to Convenient way to listen to widget events through the repository
    • Property Version changed from to 4.3 Beta
    • Property Resolution changed from to fixed
  • Ticket #13337 – Description

    v3 v11  
    1 There should be such API available.
     1Listening to widget events isn't easy if one is not the widget author. Widgets are created dynamically so first we need to listen to `repository#instanceCreated` and add listeners to every created instance of the type that we are interested in.
     2
     3More convenient way would be a good addition to the API:
     4
    25{{{
    3 editor.widgets.onChange('image2', 'data', func() {});
     6editor.widgets.onWidget('image2', 'data', func() {});
    47}}}
    58
    6 So we are listening once on widgets repo, and callback is executed when event occur on specific widget.
    7 
    8 Callback function should be called on elements which are created after adding listener callback.
© 2003 – 2019 CKSource – Frederico Knabben. All rights reserved. | Terms of use | Privacy policy