Opened 16 years ago

Closed 16 years ago

#2453 closed New Feature (fixed)

V3: Code loading

Reported by: Frederico Caldeira Knabben Owned by: Frederico Caldeira Knabben
Priority: Normal Milestone: CKEditor 3.0
Component: General Version:
Keywords: Confirmed V3ProtoCore Review+ Cc:

Description

The code loading must be implemented as described at Loading and Startup in the V3 documentation

Change History (3)

comment:1 Changed 16 years ago by Frederico Caldeira Knabben

Keywords: Review? added
Owner: set to Frederico Caldeira Knabben
Status: newassigned

The CKEditor prototype implements all loading methods described in the Loading and Startup page. The final result is that we have two "entry point" scripts to be used on pages:

  • ckeditor.js (ckeditor_source.js): the full editor code.
  • ckeditor_basic.js (ckeditor_basic_source.js): the basic editor functions, enough to create editor instances on the page. By using FCKpackager, this file currently has 6KB (to be optimized yet).

To achieve this, part of the code had to be splitted. Because of this we have "core/ckeditor.js" and "core/ckeditor_basic.js", as well as "core/editor.js" and "core/editor_basic.js". The "basic" file contains only the "_basic" versions of those core files, while the full code contains both pairs of files. This solution may have left the the code a bit messy for those core files, but it works pretty well. We could think about changing this system later if we implement some kind of "pre-processing" instructions to be used by the packager.

Testing the loading methods

By default our samples use the "Inline" loading method. The divreplace.html method can be used to test the other loading methods. For that, the samples.html file must be changes to load the "basic" version instead, keeping attention to the comments available there. Then, just use the Net tab in Firebug to see the results.

Development version loading

For the trunk/development loading instead, a dedicated loading system has been developed. It uses the CKEDITOR.loader object (core/loader.js), which is not use in the release version instead. The ckeditor_source.js and ckeditor_basic_source.js files are just startup files that use the loader to load the code.

The loader contains a dependency map, which forces the load of all necessary files to run the editor.

As the loader needs some minimun information from the CKEDITOR object, a small subset of its features have been defined in the "core/ckeditor_base.js" file. The compressed version of this code is copy/pasted in the ckeditor_source.js and ckeditor_basic_source.js files.

The CKEDITOR object

Because of all the above, the CKEDITOR object is defined by the "core/ckeditor_base.js", "core/ckeditor_basic.js" and "core/ckeditor.js" files together, in that order.

comment:2 Changed 16 years ago by Martin Kou

Keywords: Review+ added; Review? removed

comment:3 Changed 16 years ago by Frederico Caldeira Knabben

Resolution: fixed
Status: assignedclosed
Note: See TracTickets for help on using tickets.
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy