#2458: V3: Plugins
-----------------------------------+----------------------------------------
Reporter: fredck | Owner:
Type: New Feature | Status: new
Priority: Normal | Milestone: CKEditor 3.0
Component: General | Version:
Keywords: Confirmed V3ProtoCore |
-----------------------------------+----------------------------------------
The CKEditor prototype is strongly based on plugins. The intention is
reducing the core code to the minimum, leaving all other features isolated
on plugins. It makes it possible to create customized distributions
containing only specific sets of features.
When the instance is created, all plugins listed in the
<instance>.config.plugins setting are downloaded. Each plugin should call
the CKEDITOR.plugins.add() function to register its "plugin definition".
This definition is an object containing properties, as documented in the
"core/plugindefinition.js" file.
As soon as all plugins are downloaded, the "beforeInit" and "init"
function in their definitions are called, passing the editor instance to
them. In this way, each plugin can make instance manipulations.
Each plugin is downloaded once, and shared among all instances. But, the
"beforeInit" and "init" functions are only called for those instances
which have the plugin defined in the settings. The plugins download and
caching is managed by the CKEDITOR.resourceManager class
(core/resourcemanager.js), which is used also by the theme system, and in
the future by the adapters.
All plugins are downloaded from the "plugins" folder. The plugin name in
the settings must match the plugin folder name. Each plugin must have the
plugin.js file defined.
It is possible to configure the editor to download plugins from other
folders. This can be done inpage, or in the custom configuration file, by
calling the CKEDITOR.plugins.addExternal function. For example:
{{{
CKEDITOR.plugins.addExternal( 'myplugin', '/customplugin/' );
}}}
In the above case, if an instance uses the "myplugin" plugin, the
"/customplugin/plugin.js" file will be downloaded.
Plugins may have dependencies which can be expressed by the "requires"
property in their definitions. All required plugins are downloaded and
executed. Check the "htmldataprocessor" for an example.
--
Ticket URL: <http://dev.fckeditor.net/ticket/2458>
FCKeditor <http://www.fckeditor.net/>
The text editor for Internet
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
FCKeditor-Trac mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/fckeditor-trac