Error codes
CKEditor 5 Framework logs errors and warnings to the console. The following list contains more detailed descriptions of those issues.
-
The same
className
in one of thealignment.options
was already declared.Parameters
option : Object
First option that declares given
className
.configuredOptions : Array.<(String | AlignmentFormat)>
Contents of
alignment.options
.
-
The
className
property has to be defined for all options once at least one option declaresclassName
.Parameters
configuredOptions : Array.<(String | AlignmentFormat)>
Contents of
alignment.options
.
-
The same
name
in one of thealignment.options
was already declared. Eachname
representing one alignment option can be set exactly once.Parameters
option : Object
First option that declares given
name
.configuredOptions : Array.<(String | AlignmentFormat)>
Contents of
alignment.options
.
-
The
name
in one of thealignment.options
is not recognized. The available options are:'left'
,'right'
,'center'
and'justify'
.Parameters
option : Object
Options with unknown value of the
name
property.
-
An error thrown when the target type is invalid.
The target should be either:
- a DOM element,
- a rect instance,
- a callback that returns one of above.
-
The annotation already exists in the collection. It can not be added more than once.
-
The annotation does not exist in the collection and cannot be removed.
-
UI of a given name has been not registered.
-
An annotation should always belong only to one annotations UI instance. Check filters that were passed to
activate
methods. -
UI of a given name already registered.
-
The annotations UI plugin should implement
AnnotationsUI
interface. -
The editor passed to
attachToForm()
must implement theElementApi
interface. -
Cannot get elements with the same id for an attribute element without id.
-
The attribute with given key already exists for the given node.
Parameters
node : Node
key : String
-
The range to change is not flat.
-
Changed node has different attribute value than operation's old attribute value.
Parameters
item : Item
key : String
value : *
-
The string value for a
type
property of theBatch
constructor has been deprecated and will be removed in the near future. Please refer to theBatch
constructor API documentation for more information. -
The
Batch#type
property has been deprecated and will be removed in the near future. UseBatch#isLocal
,Batch#isUndoable
,Batch#isUndo
andBatch#isTyping
instead. -
Thrown when there is an attempt to make changes to the view tree when it is in incorrect state. This may cause some unexpected behaviour and inconsistency between the DOM and the view. This may be caused by:
- calling
change
orforceRender
during rendering process, - calling
change
orforceRender
inside of post-fixer function.
- calling
-
This error is thrown when due to a mistake in how CKEditor 5 was installed or initialized, some of its modules were duplicated (evaluated and executed twice). Module duplication leads to inevitable runtime errors.
There are many situations in which some modules can be loaded twice. In the worst case scenario, you may need to check your project for each of these issues and fix them all.
Trying to add a plugin to an existing build
If you import an existing CKEditor 5 build and a plugin like this:
import ClassicEditor from '@ckeditor/ckeditor5-build-classic'; import Highlight from '@ckeditor/ckeditor5-highlight/src/highlight';
Then your project loads some CKEditor 5 packages twice. How does it happen?
The build package contains a file which is already compiled with webpack. This means that it contains all the necessary code from e.g.
@ckeditor/ckeditor5-engine
and@ckeditor/ckeditor5-utils
.However, the
Highlight
plugin imports some of the modules from these packages, too. If you ask webpack to build such a project, you will end up with the modules being included (and run) twice — first, because they are included inside the build package, and second, because they are required by theHighlight
plugin.Therefore, you must never add plugins to an existing build unless your plugin has no dependencies.
Adding plugins to a build is done by taking the source version of this build (so, before it was built with webpack) and adding plugins there. In this situation, webpack will know that it only needs to load each plugin once.
Read more in the "Installing plugins" guide.
Confused an editor build with an editor implementation
This scenario is very similar to the previous one, but has a different origin.
Let's assume that you wanted to use CKEditor 5 from source, as explained in the "Building from source" section or in the "Quick start" guide of CKEditor 5 Framework.
The correct way to do so is to import an editor and plugins and run them together like this:
import ClassicEditor from '@ckeditor/ckeditor5-editor-classic/src/classiceditor'; import Essentials from '@ckeditor/ckeditor5-essentials/src/essentials'; import Paragraph from '@ckeditor/ckeditor5-paragraph/src/paragraph'; import Bold from '@ckeditor/ckeditor5-basic-styles/src/bold'; import Italic from '@ckeditor/ckeditor5-basic-styles/src/italic'; ClassicEditor .create( document.querySelector( '#editor' ), { plugins: [ Essentials, Paragraph, Bold, Italic ], toolbar: [ 'bold', 'italic' ] } ) .then( editor => { console.log( 'Editor was initialized', editor ); } ) .catch( error => { console.error( error.stack ); } );
However, you might have mistakenly imported a build instead of the source
ClassicEditor
. In this case your imports will look like this:import ClassicEditor from '@ckeditor/ckeditor5-build-classic'; import Essentials from '@ckeditor/ckeditor5-essentials/src/essentials'; import Paragraph from '@ckeditor/ckeditor5-paragraph/src/paragraph'; import Bold from '@ckeditor/ckeditor5-basic-styles/src/bold'; import Italic from '@ckeditor/ckeditor5-basic-styles/src/italic';
This creates the same situation as in the previous section because you use a build together with source plugins.
Remember:
@ckeditor/ckeditor5-build-*
packages contain editor builds and@ckeditor/ckeditor5-editor-*
contain source editors.Loading two or more builds on one page
If you use CKEditor 5 builds, you might have loaded two (or more)
ckeditor.js
files on one web page. Check your web page for duplicated<script>
elements or make sure your page builder/bundler includes CKEditor only once.If you want to use two different types of editors at once, see the "Using two different editors" section.
Using outdated packages
Building CKEditor 5 from source requires using multiple npm packages. These packages have their dependencies to other packages. If you use the latest version of, for example,
@ckeditor/ckeditor5-editor-classic
with an outdated version of@ckeditor/ckeditor5-image
, npm or yarn will need to install two different versions of@ckeditor/ckeditor5-core
because@ckeditor/ckeditor5-editor-classic
and@ckeditor/ckeditor5-image
may require different versions of the core package.The solution to this issue is to update all packages to their latest version. We recommend using tools like
npm-check-updates
which simplify this process.Conflicting version of dependencies
This is a special case of the previous scenario. If you use CKEditor 5 with some third-party plugins, it may happen that even if you use the latest versions of the official packages and the latest version of these third-party packages, there will be a conflict between some of their dependencies.
Such a problem can be resolved by either downgrading CKEditor 5 packages (which we do not recommend) or asking the author of the third-party package to upgrade its depdendencies (or forking their project and doing this yourself).
Note: All official CKEditor 5 packages (excluding integrations and
ckeditor5-dev-*
packages) are released in the same major version. This is — in thex.y.z
, thex
is the same for all packages. This is the simplest way to check whether you use packages coming from the same CKEditor 5 version. You can read more about versioning in the Versioning policy guide.Packages were duplicated in
node_modules
In some situations, especially when calling
npm install
multiple times, it may happen that npm will not correctly "deduplicate" packages.Normally, npm deduplicates all packages so, for example,
@ckeditor/ckeditor5-core
is installed only once innode_modules/
. However, it is known to fail to do so from time to time.We recommend checking if any of the steps listed below help:
rm -rf node_modules && npm install
to make sure you have a cleannode_modules/
directory. This step is known to help in most cases.- If you use
yarn.lock
orpackage-lock.json
, remove it beforenpm install
. - Check whether all CKEditor 5 packages are up to date and reinstall them
if you changed anything (
rm -rf node_modules && npm install
).
If all packages are correct and compatible with each other, the steps above are known to help. If not, you may try to check with
npm ls
how many times packages like@ckeditor/ckeditor5-core
,@ckeditor/ckeditor5-engine
and@ckeditor/ckeditor5-utils
are installed. If more than once, verify which package causes that. -
CKFinder requires at least one plugin providing support for images loaded in the editor. Please make sure either:
Image
(which loads both types of images),- or
ImageBlock
, - or
ImageInline
.
is loaded in your editor configuration.
-
The
ckfinder.openerMethod
must be one of: "popup" or "modal". -
An internal
WebSocketGateway
error.This error might occur because of the incorrectly configured
config.cloudServices.webSocketUrl
or because of the service handling the WebSocket connections being unavailable.The original error is passed in the
error.data.originalError
property. -
An internal reconnection error.
-
The provided
tokenUrl
was not registered byregisterTokenUrl
. -
Cannot connect to the same channelId more than once.
-
Missing service with the given
channelId
. -
Missing service of a given channelId.
-
Unique
collaboration.channelId
configuration is required for defining name for data stores. Note that application instances with the same channelId will share data each other. -
This item's ID should be a string.
-
This item already exists in the collection.
-
The
index
passed toCollection#addMany()
is invalid. It must be a number between 0 and the collection's length. -
The collection cannot be bound more than once.
-
An index or ID must be given.
-
Item not found.
-
Command does not exist.
Parameters
commandName : String
Name of the command.
-
Cannot set a non-existent comment thread as an active. Check if comment thread of the given id is added to the repository.
-
Cannot set a not attached comment thread as an active. Comment thread has to be attached to the target element to set it as active.
-
Cannot set adapter more than once.
-
Adding comment threw an error.
-
Cannot add Comment to a non-existent CommentThread.
-
Comment author is not defined in Users plugin.
-
Cannot attach a non-existent comment thread.
-
CommentThread with a given id is already added to the repository.
-
Fetching a comment thread failed.
-
Comment id has to be a string.
-
Comment author id has to be a string.
-
Comment content has to be a string.
-
CommentThread id has to be a string.
-
Comment id has to be a string.
-
Target is required to open new comment thread.
-
Comment thread with a given id is not added to the editor nor adapter is defined. See https://ckeditor.com/docs/ckeditor5/latest/features/collaboration/comments/integrate-comments-with-application.html.
-
Comment thread with a given id is not added to the editor nor adapter.getCommentThread() is defined. See https://ckeditor.com/docs/ckeditor5/latest/features/collaboration/comments/integrate-comments-with-application.html.
-
Removing comment resulted in an error.
-
Cannot remove comment from a non-existent CommentThread.
-
Removing comment resulted in an error.
-
Cannot remove a non-existent Comment.
-
Cannot remove a non-existent comment thread.
-
Updating comment resulted in an error.
-
Comment content has to be a string.
-
Cannot update a comment of a non-existent CommentThread.
-
Cannot update a non-existent Comment.
-
The required component is not registered in the component factory. Please make sure the provided name is correct and the component has been correctly added to the factory.
Parameters
name : String
The name of the missing component.
-
Cannot add multiple editors to the context which is created by the editor.
-
Only a constructor function is allowed as a context plugin.
-
Only a plugin marked as a context plugin is allowed to be used with a context.
-
Trying to add configuration of the same view more than once.
-
Trying to remove the configuration of the view not defined in the stack.
-
Trying to show a stack that does not exist.
-
Trying to register an alias for a dispatcher that nas not been registered.
-
This error occurs when a text node's attribute is to be downcasted by an
Attribute to Attribute converter
. In most cases it is caused by converters misconfiguration when only "generic" converter is defined:editor.conversion.for( 'downcast' ).attributeToAttribute( { model: 'attribute-name', view: 'attribute-name' } ) );
and given attribute is used on text node, for example:
model.change( writer => { writer.insertText( 'Foo', { 'attribute-name': 'bar' }, parent, 0 ); } );
In such cases, to convert the same attribute for both
Element
andText
nodes, text specificAttribute to Element converter
with higher priority must also be defined:editor.conversion.for( 'downcast' ).attributeToElement( { model: { key: 'attribute-name', name: '$text' }, view: ( value, { writer } ) => { return writer.createAttributeElement( 'span', { 'attribute-name': value } ); }, converterPriority: 'high' } ) );
-
This error occurs when a model element is downcasted via
elementToStructure
helper but the element was allowed to host$text
by the model schema.For instance, this may be the result of
myElement
allowing the content of$block
in its schema definition:// Element definition in schema. schema.register( 'myElement', { allowContentOf: '$block', // ... } ); // ... // Conversion of myElement with the use of elementToStructure(). editor.conversion.for( 'downcast' ).elementToStructure( { model: 'myElement', view: ( modelElement, { writer } ) => { // ... } } );
In such case,
elementToElement()
helper can be used instead to get around this problem:editor.conversion.for( 'downcast' ).elementToElement( { model: 'myElement', view: ( modelElement, { writer } ) => { // ... } } );
Parameters
elementName : String
The name of the element the structure is to be created for.
-
Trying to add a converter to an unknown dispatchers group.
-
Trying to register a group name that has already been registered.
-
Some of the model items were not consumed while downcasting the model to view.
This might be the effect of:
- A missing converter for some model elements. Make sure that you registered downcast converters for all model elements.
- A custom converter that does not consume converted items. Make sure that you consumed all model elements that you converted from the model to the view.
- A custom converter that called
event.stop()
. When providing a custom converter, keep in mind that you should not stop the event. If you stop it then the default converter at thelowest
priority will not trigger the conversion of this node's attributes and child nodes.
Parameters
items : Array.<Item>
Items that were not consumed.
-
Filters provided to
writer.createSlot()
are incomplete and exclude at least one children element (one of the children elements would not be assigned to any of the slots).Parameters
element : Element
The element of which children would not be properly allocated to multiple slots.
-
Filters provided to
writer.createSlot()
overlap (at least two filters accept the same child element).Parameters
element : Element
The element of which children would not be properly allocated to multiple slots.
-
Unknown slot mode was provided to
writer.createSlot()
in downcast converter. -
The definition cannot be handled by the data filter.
Make sure that the registered definition is correct.
-
Cannot get data from a non-existing root. This error is thrown when DataController#get() method is called with a non-existent root name. For example, if there is an editor instance with only
main
root, callingget
like:data.get( { rootName: 'root2' } );
will throw this error.
-
Cannot init data on a non-existent root. This error is thrown when DataController#init() method is called with non-existent root name. For example, if there is an editor instance with only
main
root, callinginit
like:data.init( { main: '<p>Foo</p>', root2: '<p>Bar</p>' } );
will throw this error.
-
Cannot set data on a non-existent root. This error is thrown when the DataController#set() method is called with non-existent root name. For example, if there is an editor instance with only the default
main
root, callingset
like:data.set( { main: '<p>Foo</p>', root2: '<p>Bar</p>' } );
will throw this error.
-
Cannot detach document node.
-
The
DocumentList
feature can not be loaded together with theList
plugin.Parameters
conflictPlugin : String
Name of the plugin.
-
Restoring gravity for an unknown UID is not possible. Make sure you are using a correct UID obtained from the
overrideSelectionGravity
to restore.Parameters
uid : String
The unique identifier returned by
_overrideGravity
.
-
Range from document selection starts or ends at incorrect position.
Parameters
range : Range
-
The
dataPipeline:transparentRendering
flag is supported only in the data pipeline. -
The
DomConverter
detected an interactive attribute in the editing pipeline. For the best editing experience, the attribute was renamed todata-ck-unsafe-attribute-[original attribute name]
.If you are the author of the plugin that generated this attribute and you want it to be preserved in the editing pipeline, you can configure this when creating the element using
DowncastWriter
during the model–view conversion. Methods such ascreateContainerElement
,createAttributeElement
, orcreateEmptyElement
accept an option that will disable filtering of specific attributes:const paragraph = writer.createContainerElement( 'p', { class: 'clickable-paragraph', onclick: 'alert( "Paragraph clicked!" )' }, { // Make sure the "onclick" attribute will pass through. renderUnsafeAttributes: [ 'onclick' ] } );
Parameters
domElement : HTMLElement
The DOM element the attribute was set on.
key : String
The original name of the attribute
value : String
The value of the original attribute
-
While rendering the editor content, the
DomConverter
detected a<script>
element that may disrupt the editing experience. To avoid this, the<script>
element was replaced with<span data-ck-unsafe-element="script"></span>
. -
While rendering the editor content, the
DomConverter
detected a<style>
element that may affect the editing experience. To avoid this, the<style>
element was replaced with<span data-ck-unsafe-element="style"></span>
. -
The Easy Image feature requires one of the following plugins to be loaded to work correctly:
ImageBlock
,ImageInline
,Image
(loads bothImageBlock
andImageInline
)
Please make sure your editor configuration is correct.
Parameters
editor : Editor
-
The marker with the provided name does not exist and cannot be reconverted.
Parameters
markerName : String
The name of the reconverted marker.
-
The
config.initialData
option cannot be used together with initial data passed as the first parameter ofEditor.create()
. -
The editor initial data was replaced with the most recent revision data as the two were different.
This means that the editor data was either outdated due to an error (e.g. document data has not been saved after last changes during the previous editing session) or the data was post-processed after it was obtained from the editor.
-
The Editor#isReadOnly property is read-only since version
34.0.0
and can be set only usingEditor#enableReadOnlyMode( lockId )
andEditor#disableReadOnlyMode( lockId )
.Usage before version
34.0.0
:editor.isReadOnly = true; editor.isReadOnly = false;
Usage since version
34.0.0
:editor.enableReadOnlyMode( 'my-feature-id' ); editor.disableReadOnlyMode( 'my-feature-id' );
-
Cannot update the source element of a detached editor.
The
updateSourceElement()
method cannot be called if you did not pass an element toEditor.create()
. -
The lock ID is missing or it is not a string or symbol.
-
A DOM element used to create the editor (e.g.
InlineEditor.create()
) has already been used to create another editor instance. Make sure each editor is created with an unique DOM element.Parameters
element : HTMLElement
DOM element that caused the collision.
-
The
EditorUI#_editableElements
property has been deprecated and will be removed in the near future. Please usesetEditableElement()
andgetEditableElement()
methods instead.Parameters
editorUI : EditorUI
Editor UI instance the deprecated property belongs to.
-
The
EditorConfig#toolbar.viewportTopOffset
property has been deprecated and will be removed in the near future. Please useEditorConfig#ui.viewportOffset
instead. -
This error is thrown when trying to pass a
<textarea>
element to acreate()
function of an editor class.The only editor type which can be initialized on
<textarea>
elements is the classic editor. This editor hides the passed element and inserts its own UI next to it. Other types of editors reuse the passed element as their root editable element and therefore<textarea>
is not appropriate for them. Use a<div>
or another text container instead:<div id="editor"> <p>Initial content.</p> </div>
-
Function required.
editorannotations-invalid-source-callback
-
You need to enable an upload adapter in order to be able to upload files.
This warning shows up when
FileRepository
is being used without defining an upload adapter.If you see this warning when using one of the CKEditor 5 Builds it means that you did not configure any of the upload adapters available by default in those builds.
See the comprehensive "Image upload overview" to learn which upload adapters are available in the builds and how to configure them.
If you see this warning when using a custom build there is a chance that you enabled a feature like
ImageUpload
, orImageUploadUI
but you did not enable any upload adapter. You can choose one of the existing upload adapters listed in the "Image upload overview".You can also implement your own image upload adapter.
-
You cannot call read if the status is different than idle.
-
You cannot call upload if the status is different than idle.
-
Problem with decoding Base64 image data.
-
Api address must be provided as the third argument.
-
File must be provided as the first argument.
-
Token must be provided as the second argument.
-
Uploading file failed.
-
The
config.finishEditing.action
must be a function. -
This element is already tracked by
FocusTracker
. -
Provided value as an option for
FontSize
seems to invalid.See valid examples described in the plugin configuration.
-
If
config.fontSize.supportAllValues
istrue
, you need to use numerical values as font size options.See valid examples described in the plugin configuration.
Parameters
presets : Array.<String>
Invalid values.
-
When using the HTML embed feature with the
htmlEmbed.showPreviews=true
option, it is strongly recommended to define a sanitize function that will clean up the input HTML in order to avoid XSS vulnerability.For a detailed overview, check the HTML embed feature documentation.
-
The
ImageBlock
plugin must be enabled to allow inserting block images. Seetype
to learn more. -
The
ImageInline
plugin must be enabled to allow inserting inline images. Seetype
to learn more. -
The image style definition provided in the configuration is invalid.
Please make sure the definition implements properly one of the following:
Parameters
[ dropdown ] : String
The name of the invalid drop-down
[ style ] : String
The name of the invalid image style option
-
In order to work correctly, each image style option requires specific model elements (also: types of images) to be supported by the editor.
Model element names to which the image style option can be applied are defined in the
modelElements
property of the style option definition.Explore the warning in the console to find out precisely which option is not supported and which editor plugins are missing. Make sure these plugins are loaded in your editor to get this image style option working.
Parameters
[ option ] : String
The name of the unsupported option.
[ missingPlugins ] : String
The names of the plugins one of which has to be loaded for the particular option.
-
When configuring
config.image.resizeOptions
for standalone buttons, a validicon
token must be set for each option.See all valid options described in the plugin configuration.
Parameters
option : ImageResizeOption
Invalid image resize option.
-
Cannot attach the same annotation twice.
-
Cannot detach a UI if it is not attached.
-
The
InlineAnnotations
plugin is not allowed as aContext
plugin. It can be used as an editor plugin only. -
Insertion position is invalid.
-
An internal error occurred when merging inserted content with its siblings. The insertion position should equal the merge position.
If you encountered this error, report it back to the CKEditor 5 team with as many details as possible regarding the content being inserted and the insertion position.
-
Tried to insert an element with insertObject() function that is not defined as an object in schema. See
SchemaItemDefinition
. If you want to insert content that is not an object you might want to use insertContent() function. -
The unsupported
options.setSelection
parameter was passed to the insertObject() function. Check the insertObject() API documentation for allowedoptions.setSelection
parameter values. -
Date format must be a function.
-
Invalid license key. Please contact our customer support at https://ckeditor.com/contact/.
-
Unknown key name. Only key names included in the
keyCodes
can be used.Parameters
key : String
-
Letters should be bootstrapped on an
HTMLElement
element.const element = document.createElement( 'div' ); letters.bootstrap( element );
or:
const element = document.createElement( 'div' ); Letters.create( element, config ) .then( letters => {} );
-
LettersUI is already created.
-
The
Locale#language
property was deprecated and will be removed in the near future. Please use theuiLanguage
andcontentLanguage
properties instead. -
A model position could not be mapped to the view because the parent of the model position does not have a mapped view element (might have not been converted yet or it has no converter).
Make sure that the model element is correctly converted to the view.
-
Cannot use a destroyed marker instance.
-
Marker name cannot contain the "," character.
-
Marker with provided name does not exists.
-
The key-value matcher pattern for
attributes
option is using deprecatedclass
key.Use
classes
matcher pattern option instead:// Instead of: const pattern = { attributes: { key1: 'value1', key2: 'value2', class: 'foobar' } } // Use: const pattern = { attributes: { key1: 'value1', key2: 'value2' }, classes: 'foobar' }
Refer to the Migration to v29.1.0 guide and the
MatcherPattern
documentation.Parameters
pattern : Object
Pattern with missing properties.
-
The key-value matcher pattern for
attributes
option is using deprecatedstyle
key.Use
styles
matcher pattern option instead:// Instead of: const pattern = { attributes: { key1: 'value1', key2: 'value2', style: /^border.*$/ } } // Use: const pattern = { attributes: { key1: 'value1', key2: 'value2' }, styles: /^border.*$/ }
Refer to the Migration to v29.1.0 guide and
MatcherPattern
documentation.Parameters
pattern : Object
Pattern with missing properties.
-
The key-value matcher pattern is missing key or value. Both must be present. Refer the documentation:
MatcherPattern
.Parameters
pattern : Object
Pattern with missing properties.
-
One of the providers (or extra providers) specified in the media embed configuration has no name and will not be used by the editor. In order to get this media provider working, double check your editor configuration.
-
The callback used for obtaining mention autocomplete feed thrown and error and the mention UI was hidden or not displayed at all.
Parameters
marker : String
Configured marker for which error occurred.
-
The feed item ID must start with the marker character.
Correct mention feed setting:
mentions: [ { marker: '@', feed: [ '@Ann', '@Barney', ... ] } ]
Incorrect mention feed setting:
mentions: [ { marker: '@', feed: [ 'Ann', 'Barney', ... ] } ]
See
MentionConfig
. -
The marker must be a single character.
-
The marker must be a single character.
Correct markers:
'@'
,'#'
.Incorrect markers:
'$'
,'[@'
.See
MentionConfig
.Parameters
marker : String
Configured marker
-
Merge operation specifies wrong number of nodes to move.
-
Merge source position is invalid. The element to be merged must have a parent node.
-
Merge target position is invalid. The element to be merged must have a parent node.
-
Model#createPositionAt()
requires the offset to be specified when the first parameter is a model item. -
A root with the specified name already exists.
Parameters
doc : Document
name : String
-
Only operations with matching versions can be added to the history.
Parameters
errorData : Object
The operation and the current document history version.
-
LivePosition's root has to be an instance of RootElement.
-
The node's parent does not contain this node.
-
Given index cannot be found in the node list.
-
Trying to insert an object which is not a Node instance.
-
Given offset cannot be found in the node list.
Parameters
offset : Number
nodeList : NodeList
Stringified node list.
-
You can not make a position after a root element.
Parameters
root : Item
-
You can not make a position before a root element.
Parameters
root : Item
-
Cannot create position for document. Root with specified name does not exist.
Parameters
rootName : String
-
Position parent have to be a model element or model document fragment.
-
The position's path is incorrect. This means that a position does not point to a correct place in the tree and hence, some of its methods and getters cannot work correctly.
Note: Unlike DOM and view positions, in the model, the position's parent is always an element or a document fragment. The last offset in the position's path is the point in this element where this position points.
Read more about model positions and offsets in the Editing engine architecture guide.
Parameters
position : Position
The incorrect position.
-
Position path must be an array with at least one item.
Parameters
path
-
Position root is invalid.
Positions can only be anchored in elements or document fragments.
-
Cannot set selection focus if there are no ranges in selection.
-
selection.setTo requires the second parameter when the first parameter is a node.
-
Given
length
value is incorrect. -
Given
offsetInText
value is incorrect. -
Neither boundaries nor starting position of a
TreeWalker
have been defined. -
Only
backward
andforward
direction allowed. -
Cannot move a node from a document to a different tree. It is forbidden to move a node that was already in a document outside of it.
-
Trying to move a range of nodes into one of nodes from that range.
-
The nodes which should be moved do not exist.
-
Trying to move a range of nodes into the middle of that range.
-
Cannot attach narrow sidebar twice.
-
Cannot detach not attached sidebar.
-
The compressor cannot compress operations because no operation was provided.
-
Missing container element.
-
Properties must be unique.
-
Cannot bind the same property more than once.
-
Cannot bind multiple properties and use a callback in one binding.
-
Binding one attribute to many observables only possible with one attribute.
-
Binding multiple observables only possible with callback.
-
Invalid argument syntax in
to()
. -
The number of properties must match.
-
All properties must be strings.
-
Cannot override an existing property.
This error is thrown when trying to set a property with a name of an already existing property. For example:
let observable = new Model(); observable.property = 1; observable.set( 'property', 2 ); // throws observable.set( 'property', 1 ); observable.set( 'property', 2 ); // ok, because this is an existing property.
-
Properties must be strings.
-
Cannot decorate an undefined method.
Parameters
object : Object
The object which method should be decorated.
methodName : String
Name of the method which does not exist.
-
Trying to move a range which starts and ends in different element.
-
Trying to remove a range which starts and ends in different element.
-
The configuration required by the pagination plugin is missing. Follow the instructions provided in Pagination feature documentation to initialize the plugin properly.
Parameters
config : EditorConfig
Configuration of the editor.
-
Invalid license key. Please contact our customer support at https://ckeditor.com/contact/.
-
You have exhausted the trial usage limit. You need to restart the editor now. Please contact our customer support to get a full access at https://ckeditor.com/contact/.
-
The message must be a string.
-
Trying to set permissions for a
channelId
that does not exist. -
If a plugin is a context plugin, all plugins it requires should also be context plugins instead of plugins. In other words, if one plugin can be used in the context, all its requirements should also be ready to be used in the context. Note that the context provides only a part of the API provided by the editor. If one plugin needs a full editor API, all plugins which require it are considered as plugins that need a full editor API.
Parameters
plugin : String
The name of the required plugin.
requiredBy : String
The name of the parent plugin.
-
The plugin replacing an existing plugin cannot depend on other plugins.
-
The replaced plugin does not exist in the available plugins collection.
-
The replaced plugin will not be loaded so it cannot be replaced.
-
Two plugins with the same
pluginName
were loaded. This will lead to runtime conflicts between these plugins.In practice, this warning usually means that new plugins were added to an existing CKEditor 5 build. Plugins should always be added to a source version of the editor (
@ckeditor/ckeditor5-editor-*
), not to an editor imported from one of the@ckeditor/ckeditor5-build-*
packages.Check your import paths and the list of plugins passed to
Editor.create()
or specified inEditor.builtinPlugins
.The second option is that your
node_modules/
directory contains duplicated versions of the same CKEditor 5 packages. Normally, on clean installations, npm deduplicates packages innode_modules/
, so it may be enough to callrm -rf node_modules && npm i
. However, if you installed conflicting versions of some packages, their dependencies may need to be installed in more than one version which may lead to this warning.Technically speaking, this error occurs because after adding a plugin to an existing editor build the dependencies of this plugin are being duplicated. They are already built into that editor build and now get added for the second time as dependencies of the plugin you are installing.
Read more about installing plugins.
Parameters
pluginName : String
The duplicated plugin name.
plugin1 : function
The first plugin constructor.
plugin2 : function
The second plugin constructor.
-
A plugin is not available and could not be loaded.
Plugin classes (constructors) need to be provided to the editor before they can be loaded by name. This is usually done in CKEditor 5 builds by setting the
builtinPlugins
property.If you see this warning when using one of the CKEditor 5 Builds, it means that you try to enable a plugin which was not included in that build. This may be due to a typo in the plugin name or simply because that plugin is not a part of this build. In the latter scenario, read more about custom builds.
If you see this warning when using one of the editor creators directly (not a build), then it means that you tried loading plugins by name. However, unlike CKEditor 4, CKEditor 5 does not implement a "plugin loader". This means that CKEditor 5 does not know where to load the plugin modules from. Therefore, you need to provide each plugin through a reference (as a constructor function). Check out the examples in "Building from source".
Parameters
plugin : String
The name of the plugin which could not be loaded.
-
The plugin is not loaded and could not be obtained.
Plugin classes (constructors) need to be provided to the editor and must be loaded before they can be obtained from the plugin collection. This is usually done in CKEditor 5 builds by setting the
builtinPlugins
property.Note: You can use
editor.plugins.has()
to check if a plugin was loaded.Parameters
plugin : String
The name of the plugin which is not loaded.
-
The plugin replacing an existing plugin must be a function.
-
The plugin replacing an existing plugin must have a name.
-
The replaced plugin cannot depend on other plugins.
-
Cannot load a plugin because one of its dependencies is listed in the
removePlugins
option.Parameters
plugin : String
The name of the required plugin.
requiredBy : String
The name of the parent plugin.
-
A required "soft" dependency was not found on the plugin list.
When configuring the editor, either prior to building (via
Editor.builtinPlugins
) or when creating a new instance of the editor (e.g. viaconfig.plugins
), you need to provide some of the dependencies for other plugins that you used.This error is thrown when one of these dependencies was not provided. The name of the missing plugin can be found in
missingPlugin
and the plugin that required it inrequiredBy
.In order to resolve it, you need to import the missing plugin and add it to the current list of plugins (
Editor.builtinPlugins
orconfig.plugins
/config.extraPlugins
).Soft requirements were introduced in version 26.0.0. If you happen to stumble upon this error when upgrading to version 26.0.0, read also the Migration to 26.0.0 guide.
Parameters
missingPlugin : String
The name of the required plugin.
requiredBy : String
The name of the plugin that requires the other plugin.
-
Cannot get a descriptor before building
ProtobufFactory
. -
At least one range has to be passed to
Range._createFromRanges()
. -
Trying to use
editor.setData()
oreditor.data.set()
in real-time collaboration. Re-setting data in real-time collaboration usually means a mistake (incorrect integration or plugin). Using it may overwrite local (not yet synchronized) changes on remote clients. If you tried to set editor initial data, useinitialData
configuration option instead. If you tried to set editor data in a plugin, consider applying the changes through theWriter
in amodel.change()
block. If you understand effects of usingeditor.data.set()
in real-time collaboration and want to suppress this error, setsuppressErrorInCollaboration
flag totrue
in the second parameter ofeditor.data.set()
call:editor.data.set( '<p>Your data</p>', { suppressErrorInCollaboration: true } )
. -
Server response error.
-
Trying to set initial data to initialized document.
-
Attempting to init data on a non-existing root.
-
Connecting to the session resulted in an error.
-
An incorrect operation came from the server.
-
Internal
CollaborativeEditingService
error. -
Sending update to the server threw an error.
-
Element to change has different name than operation's old name.
-
Given position is invalid or node after it is not instance of Element.
-
Configuration for revision history plugin is missing.
Please refer to documentation to learn how to set up the plugin.
-
The attribute with given key already exists for the given node.
Parameters
root : RootElement
key : String
-
Cannot create RootAttributeOperation for document. Root with specified name does not exist.
Parameters
rootName : String
-
The element to change is not a root element.
Parameters
root : RootElement
key : String
value : *
-
The attribute which should be removed does not exists for the given node.
Parameters
root : RootElement
key : String
value : *
-
Cannot extend an item which was not registered yet.
This error happens when a plugin tries to extend the schema definition of an item which was not registered yet.
Parameters
itemName
The name of the model element which is being extended.
-
A single item cannot be registered twice in the schema.
This situation may happen when:
- Two or more plugins called
register()
with the same name. This will usually mean that there is a collision between plugins which try to use the same element in the model. Unfortunately, the only way to solve this is by modifying one of these plugins to use a unique model element name. - A single plugin was loaded twice. This happens when it is installed by npm/yarn in two versions
and usually means one or more of the following issues:
- a version mismatch (two of your dependencies require two different versions of this plugin),
- incorrect imports (this plugin is somehow imported twice in a way which confuses webpack),
- mess in
node_modules/
(rm -rf node_modules/
may help).
Note: Check the logged
itemName
to better understand which plugin was duplicated/conflicting.Parameters
itemName
The name of the model element that is being registered twice.
- Two or more plugins called
-
The node after the merge position must be an element.
-
The node before the merge position must be an element.
-
Sessions of given channelId already registered.
-
Cannot unregister not registered sessions.
-
Missing container element.
-
Container element is not a HTMLElement.
-
The
config.simpleUpload.uploadUrl
configuration required by theSimpleUploadAdapter
is missing. Make sure the correct URL is specified for the image upload to work properly. -
The name "All" for a special category group cannot be used because it is a special category that displays all available special characters.
-
Graveyard position invalid.
-
Split operation specifies wrong number of nodes to move.
-
Split position is invalid.
-
Cannot split root element.
-
Style command can be executed only with a correct style name.
This warning may be caused by:
- passing a name that is not specified in the configuration (e.g. a CSS class name),
- when trying to apply a style that is not allowed on a given element.
-
This
TableSlot
's getter (property) was removed in CKEditor 5 v20.0.0.Check out the new
TableWalker
's API in the documentation.Parameters
getterName : String
-
The
options.at
points at a row position that does not exist. -
The
options.at
param must point at existing row andoptions.rows
must not exceed the rows in the table. -
Cannot download new token from the provided url.
-
A
tokenUrl
must be provided as the first constructor argument. -
The provided token must follow the JSON Web Tokens format.
-
There was a problem processing the configuration of the toolbar. The item with the given name does not exist so it was omitted when rendering the toolbar.
This warning usually shows up when the
Plugin
which is supposed to provide a toolbar item has not been loaded or there is a typo in the configuration.Make sure the plugin responsible for this toolbar item is loaded and the toolbar configuration is correct, e.g.
Bold
is loaded for the'bold'
toolbar item.You can use the following snippet to retrieve all available toolbar items:
Array.from( editor.ui.componentFactory.names() );
Parameters
name : String
The name of the component.
-
The toolbar multiline breaks (
-
items) only work when the automatic button grouping is disabled in the toolbar configuration. To do this, set theshouldNotGroupWhenFull
option totrue
in the editor configuration:const config = { toolbar: { items: [ ... ], shouldNotGroupWhenFull: true } }
Learn more about toolbar configuration.
-
Suggestion to accept does not exist.
-
Cannot set an adapter more than once.
-
Adapter not set or is missing
getSuggestion()
method. -
Trying to enable command that does not exist.
-
Editor creator has to be a function.
-
Suggestion to discard does not exist.
-
Suggestion marker data does not match loaded suggestion data.
-
Suggestion with given id not found.
-
User with given id not found.
-
An incorrect value was passed to the translation function. This was probably caused by an incorrect message interpolation of a plural form. Note that for messages supporting plural forms the second argument of the
t()
function should always be a number or an array with a number as the first element. -
You have exhausted the trial usage limit. You need to restart the editor now. Please contact our customer support to get a full access at https://ckeditor.com/contact/.
-
The number of children in extended definition does not match.
-
Attempting to revert a template which has not been applied yet.
-
Node definition cannot have the "tag" and "text" properties at the same time. Node definition must have either "tag" or "text" when rendering a new Node.
-
This View has already been rendered.
-
All event names must be strings.
-
An unexpected error occurred inside the CKEditor 5 codebase. This error will look like the original one to make the debugging easier.
This error is only useful when the editor is initialized using the
Watchdog
feature. In case of such error (or anyCKEditorError
error) the watchdog should restart the editor. -
Api address must be provided.
-
Token must be provided.
-
User with a given id is already added.
-
The id must be a string.
-
Cannot add a local user more than once.
-
Cannot add an undefined user as a local user.
-
Incorrect conversion result was dropped.
Model range should be a conversion result.
-
View#createPositionAt()
requires the offset to be specified when the first parameter is a view item. -
Cannot add children to
EmptyElement
. -
The node's parent does not contain this node. It means that the document tree is corrupted.
-
You can not make a position after a root.
Parameters
root : Node
-
You cannot make a position before a root.
Parameters
root : Node
-
Cannot add children to a
RawElement
instance. -
The inline filler node was lost. Most likely, something overwrote the filler text node in the DOM.
-
Unknown type passed to Renderer.markToSync.
-
Selection range set to an object that is not an instance of
Range
. -
Cannot set selection focus if there are no ranges in selection.
-
Cannot set selection to given place.
-
selection.setTo requires the second parameter when the first parameter is a node.
-
Given length value is incorrect.
-
Given offsetInText value is incorrect.
-
Neither boundaries nor starting position have been defined.
-
Only
backward
andforward
direction allowed. -
Cannot add children to
UIElement
. -
Trying to break an element which is not a container element.
-
Trying to break root element.
-
Cannot break an
EmptyElement
instance.This error is thrown if
DowncastWriter#breakAttributes()
was executed in an incorrect position. -
Cannot break a
RawElement
instance.This error is thrown if
DowncastWriter#breakAttributes()
was executed in an incorrect position. -
Cannot break a
UIElement
instance.This error is thrown if
DowncastWriter#breakAttributes()
was executed in an incorrect position. -
One of the nodes to be inserted is of an invalid type.
Nodes to be inserted with
DowncastWriter#insert()
should be of the following types: -
The
createSlot()
method is only allowed inside theelementToStructure
downcast helper callback. -
Position's parent container cannot be found.
-
The container of the given range is invalid.
This may happen if range start and range end positions are not placed inside the same container element or a parent container for these positions cannot be found.
Methods like
DowncastWriter#remove()
,DowncastWriter#clean()
,DowncastWriter#wrap()
,DowncastWriter#unwrap()
need to be called on a range that has its start and end positions located in the same container element. Both positions can be nested within other elements (e.g. an attribute element) but the closest container ancestor must be the same. -
Element before and after given position cannot be merged.
-
The
attribute
passed toDowncastWriter#unwrap()
must be an instance ofAttributeElement
. -
The
attribute
passed toDowncastWriter#wrap()
must be an instance ofAttributeElement
. -
Class and style attributes should be handled separately in
ViewConsumable#add()
.What you have done is trying to use:
consumables.add( { attributes: [ 'class', 'style' ] } );
While each class and style should be registered separately:
consumables.add( { classes: 'some-class', styles: 'font-weight' } );
-
Cannot add a plugin that does not implement the
reconnect()
method to theWebSocketGateway
reconnection stack. -
The authentication
config.cloudServices.tokenUrl
configuration is required for creating a websocket connection. -
The
config.cloudServices.webSocketUrl
configuration is required for creating a websocket connection in the real-time collaboration.ClassicEditor.create( document.createElement( 'div' ), { cloudServices: { webSocketUrl: "YOUR_WEBSOCKET_URL" // ... } // ... } );
-
A plugin was added twice to the
WebSocketGateway
reconnection stack. -
Cannot attach wide sidebar twice.
-
Cannot detach not attached sidebar.
-
The element passed to
toWidget()
must be aContainerElement
instance.Parameters
element : String
The view element passed to
toWidget()
.
-
Toolbar with the given id was already added.
Parameters
toolbarId
Toolbar id.
-
When registering a new widget toolbar, you need to provide a non-empty array with the items that will be inserted into the toolbar.
If you see this error when integrating the editor, you likely forgot to configure one of the widget toolbars.
See for instance:
Parameters
toolbarId : String
The id of the toolbar that has not been configured correctly.
-
Marker with provided name already exists.
-
Range parameter is required when adding a new marker.
-
The
options.usingOperation
parameter is required when adding a new marker. -
Trying to use a writer outside a
change()
orenqueueChange()
blocks.The writer can only be used inside these blocks which ensures that the model can only be changed during such "sessions".
-
Node after merge position must be an element.
-
Node before merge position must be an element.
-
Range is going to be moved within not the same document. Please use insert instead.
-
Invalid range to move.
-
Range to move is not flat.
-
Trying to remove marker which does not exist.
-
Trying to rename an object which is not an instance of Element.
-
Element with no parent can not be split.
-
Limit element is not a position ancestor.
-
Trying to unwrap an element which has no parent.
-
Marker with provided name does not exist and will not be updated.
-
The usage of
writer.updateMarker()
only to reconvert (refresh) a model marker was deprecated and may not work in the future. Please update your code to useeditor.editing.reconvertMarker()
instead.Parameters
markerName : String
The name of the updated marker.
-
One of the options is required - provide range, usingOperations or affectsData.
-
Element to wrap with is already attached to a tree model.
-
Element to wrap with is not empty.
-
Range to wrap is not flat.
Every day, we work hard to keep our documentation complete. Have you spotted an outdated information? Is something missing? Please report it via our issue tracker.