Drupal 8 Development Cookbook(Second Edition)
上QQ阅读APP看书,第一时间看更新

CKEditor plugins

The CKEditor module provides a plugin type called CKEditorPlugin. Plugins are small pieces of swappable functionality within Drupal 8. Plugins and plugin development are covered in Chapter 7, Plug and Play with Plugins. This type provides integration between CKEditor and Drupal 8.

The image and link capabilities are plugins defined within the CKEditor module. Additional plugins can be provided through contributed projects or custom development.

Refer to the \Drupal\ckeditor\Annotation\CKEditorPlugin class for the plugin definition and the suggested \Drupal\ckeditor\Plugin\CKEditorPlugin\DrupalImage class as a working example.