engine/dev-utils/enableenginedebug
@ckeditor/ckeditor5-engine/src/dev-utils/enableenginedebug
Filtering
Classes
-
Plugin that enables debugging features on the editor's model and view documents.
Functions
-
disableEngineDebug()
static
Restores all methods that have been overwritten.
-
enableEngineDebug( [ _logger ] ) → DebugPlugin
static
Enhances model classes with logging methods. Returns a plugin that should be loaded in the editor to enable debugging features.
Every operation applied on model.Document is logged.
The following classes are expanded with
log
and meaningfultoString
methods:- model.Position,
- model.Range,
- model.Text,
- model.Element,
- model.RootElement,
- model.DocumentFragment,
- model.Document,
- all operations
- view.Element,
- view.DocumentFragment,
- view.Document.
Additionally, the following logging utility methods are added:
- model.Text
logExtended
, - model.Element
logExtended
, - model.Element
logAll
.
Additionally, the following classes are expanded with
logTree
andprintTree
methods:Finally, the following methods are added to
Editor
:logModel
,logView
,logDocuments
. All those methods take one parameter, which is the version of the model document for which the model or view document state should be logged.Parameters
[ _logger ] : Object
An object with functions used to log messages and errors. By default messages are logged to the console. If specified, it is expected to have
log()
anderror()
methods.
Returns
DebugPlugin
The plugin to be loaded into the editor.