contentEditable
documents). Add the lite plugin to ckeditor. The simplest way to do this is by adding the following line to ckeditor's config.js
:
config.extraPlugins = 'lite';
Optionally include lite-interface.js
in your source, so you can use the various constants defined in it rather than string literals.
<script type="text/javascript" src="https://github.com/loopindex/ckeditor-track-changes/raw/master/ckeditor/plugins/lite/lite-interface.js"></script>
See the documentation for all the configuration options.
The LITE plugin is automatically activated after you install it and edit config.js
as described above. For the full details of tweaking the loading process, toolbar commands, users and more, see the documentation.
lite
plugin, either access it through the editor's plugins.lite
property, or listen to the event LITE.Events.INIT
fired by the editor instance. The data
member of the event will
contain a property called lite
which references the lite plugin instance, initialized and ready for action.
bTrack
- boolean. If undefined
, change tracking is toggled, otherwise it is set to this value
bNotify
- boolean. If false, the LITE.Events.TRACKING
event is not fired.
bShow
- boolean. If undefined
, change visibility is toggled, otherwise it is set to this value
bNotify
- boolean. If false, the LITE.Events.SHOW_HIDE
event is not fired.
options
- optional object filter the changes to which this operation applies with the following properties:
exclude
include
)include
filter
{userid, time, data}
and returns a boolean
. Only changes for which the filter returns true
are included in the operation. The filter
option can work with both exclude
and include
.options
block, including custom ones, are preserved when it is sent back in the ACCEPT
or REJECT
events (see below).
options
- optional object to filter the changes to which this operation applies. See the acceptAll
method for details.
options
- optional object to filter the counted changes. See the acceptAll
method for details.
info
- An object with two members - id
and name
filter
function in options
block passed to various methods that accept change filtering. For example, you may associate a revision number with the current change set and later on filter changes according to their revision.
data
- Arbitrary data (converted to a string by the LITE
plugin).
lite-interface.js
under LITE.Events
. The following events are fired by the LITE plugin instance through its instance of ckeditor
, with the parameter in the data
member of the event info:
LITE
creates and initializes an instance of the ICE
change tracker. This happens, e.g., when you switch back from Source
mode to Wysiwyg
.options
object passed to acceptAll, if relevant)options
object passed to acceptAll, if relevant)