|
External Modules
Modules are special units in r.a.d.editor,
used for providing some statistics or for easier setting of properties for
HTML elements. Modules, like the toolbars are set in the toolsfile.xml file
using <modules> tag.
Although there are certain similarities between modules
and toolbars, these are entirely different units in terms of r.a.d.editor.
As it was said above, a toolbar and its respective tools, can be used to
achieve a task. Same can be said for the modules. The main difference is in the
way, you will go for achieving this task.
Modules can dynamically change their content and provide
some level of interactivity. You can change some text and see your changes
appear immediately in HTML View Module. And vice versa - if you add a tag in
HTML View Module, you will see your text updated.
Creating a custom module
This example shows a simple module that displays
information about the number of tables and images there are in
the content area.
It shows the basic methods that need to be implemented
by a module in order to function properly in the editor- the constructor
and the OnCreate method.
The module is in the RadEditorTestModule.js file located in the
directory of this example.
In order to make it work you need to copy the module to
the RadControls/Editor/Scripts/EDITOR_VERSION/Modules directory!
|