This package implements the widget API for CKEditor 5.
The API consists of a few primitives and helpers that make it easy to implement rich content units such as images with captions.
Browse the API documentation of this package by using the module tree on the left.
The widget API consists of two layers:
Widget plugin via its {@link module:core/plugin~Plugin.requires Plugin.requires} property.toWidget()} {@link module:widget/utils~toWidgetEditable toWidgetEditable()} functions which need to be used during the conversion in order to make a specific element either a widget or a widget's nested editable. See their documentation for more details.Besides the above mentioned core functionalities, this package implements the following utils:
WidgetToolbarRepository} plugin which exposes a nice API for registering widget toolbars.@ckeditor/ckeditor5-widget/utils} module.
The widget API is proposed in a very different way than it was in CKEditor 4. It is just a set of utilities that allow you to implement typical object-like entities. Most of the work actually happens in the {@link api/engine engine} and this API's role is only to properly conduct the engine.
npm install --save @ckeditor/ckeditor5-widget
The source code of this package is available on GitHub in https://github.com/ckeditor/ckeditor5/tree/master/packages/ckeditor5-widget.