EmptyElement (engine/view)
@ckeditor/ckeditor5-engine/src/view/emptyelement
EmptyElement class. It is used to represent elements that cannot contain any child nodes.
Filtering
Methods
-
constructor( name, [ attributes ] )
protected
Creates new instance of EmptyElement.
Throws CKEditorError
view-emptyelement-cannot-add
when third parameter is passed, to inform that usage of EmptyElement is incorrect (adding child nodes to EmptyElement is forbidden).Parameters
name : String
Node name.
[ attributes ] : Object | Iterable
Collection of attributes.
-
getFillerOffset() → null
Returns
null
because filler is not needed for EmptyElements.Returns
null
Always returns null.
-
is()
-
_insertChild()
protected
Overrides
_insertChild
method. Throws CKEditorErrorview-emptyelement-cannot-add
to prevent adding any child nodes to EmptyElement.