]>
git.immae.eu Git - perso/Immae/Projets/packagist/piedsjaloux-ckeditor-component.git/blob - editor_basic.js
14f34460b96e7efb5095d5c2dc242d20ef76f982
2 * @license Copyright (c) 2003-2016, CKSource - Frederico Knabben. All rights reserved.
3 * For licensing, see LICENSE.md or http://ckeditor.com/license
6 if ( !CKEDITOR
.editor
) {
7 // Documented at editor.js.
8 CKEDITOR
.editor = function() {
9 // Push this editor to the pending list. It'll be processed later once
10 // the full editor code is loaded.
11 CKEDITOR
._
.pending
.push( [ this, arguments
] );
13 // Call the CKEDITOR.event constructor to initialize this instance.
14 CKEDITOR
.event
.call( this );
17 // Both fire and fireOnce will always pass this editor instance as the
18 // "editor" param in CKEDITOR.event.fire. So, we override it to do that
20 CKEDITOR
.editor
.prototype.fire = function( eventName
, data
) {
21 if ( eventName
in { instanceReady: 1, loaded: 1 } )
22 this[ eventName
] = true;
24 return CKEDITOR
.event
.prototype.fire
.call( this, eventName
, data
, this );
27 CKEDITOR
.editor
.prototype.fireOnce = function( eventName
, data
) {
28 if ( eventName
in { instanceReady: 1, loaded: 1 } )
29 this[ eventName
] = true;
31 return CKEDITOR
.event
.prototype.fireOnce
.call( this, eventName
, data
, this );
34 // "Inherit" (copy actually) from CKEDITOR.event.
35 CKEDITOR
.event
.implementOn( CKEDITOR
.editor
.prototype );