Ticket #4345 (closed New Feature: fixed)

Opened 5 years ago

Last modified 3 years ago

Fire a "langLoaded" event after the languages have been loaded.

Reported by: niek Owned by: fredck
Priority: Normal Milestone: CKEditor 3.6.1
Component: UI : Language Version: 3.0
Keywords: HasPatch Cc:

Description

Currently almost every stage of the loading process will fire an event when completed, like "customConfigLoaded", "configLoaded", "pluginsLoaded".

Only the loadLang() method doesn't fire a "langLoaded" event, which might come in handy for custom language manipulation.

I want to add some custom translation-texts, and need to do it before my plugin loads. Since it is not (yet) possible to add these translations via the config (bug #1032), I want to use the "langLoaded" event.

Implementation is nothing more than adding one line:

144. editor.fire( 'langLoaded' );
145. loadPlugins( editor );

Attachments

4345.patch (650 bytes) - added by niek 5 years ago.
Patch adding the proposed line + documentation at the bottom
4345_2.patch (853 bytes) - added by fredck 3 years ago.

Change History

Changed 5 years ago by niek

Patch adding the proposed line + documentation at the bottom

comment:1 Changed 4 years ago by fredck

  • Milestone CKEditor 3.x deleted

Milestone CKEditor 3.x deleted

comment:2 Changed 3 years ago by Saare

  • Keywords HasPatch added

Changed 3 years ago by fredck

comment:3 Changed 3 years ago by fredck

  • Status changed from new to review
  • Owner set to fredck

Nice tiny patch. I've updated it to the current trunk.

comment:4 Changed 3 years ago by Saare

  • Status changed from review to review_passed

Just change the documentation:
CKEDITOR#langLoaded => CKEDITOR.editor#langLoaded.

comment:5 Changed 3 years ago by fredck

  • Status changed from review_passed to closed
  • Resolution set to fixed
  • Milestone set to CKEditor 3.6.1

Fixed with [6989].

Note: See TracTickets for help on using tickets.
© 2003 – 2012 CKSource – Frederico Knabben. All rights reserved. | Terms of use | Privacy policy