3 namespace Drupal\ckeditor;
5 use Drupal\Core\Form\FormStateInterface;
6 use Drupal\editor\Entity\Editor;
9 * Defines an interface for configurable CKEditor plugins.
11 * This allows a CKEditor plugin to define a settings form. These settings can
12 * then be automatically passed on to the corresponding CKEditor instance via
13 * CKEditorPluginInterface::getConfig().
15 * @see \Drupal\ckeditor\CKEditorPluginInterface
16 * @see \Drupal\ckeditor\CKEditorPluginButtonsInterface
17 * @see \Drupal\ckeditor\CKEditorPluginContextualInterface
18 * @see \Drupal\ckeditor\CKEditorPluginCssInterface
19 * @see \Drupal\ckeditor\CKEditorPluginBase
20 * @see \Drupal\ckeditor\CKEditorPluginManager
21 * @see \Drupal\ckeditor\Annotation\CKEditorPlugin
24 interface CKEditorPluginConfigurableInterface extends CKEditorPluginInterface {
27 * Returns a settings form to configure this CKEditor plugin.
29 * If the plugin's behavior depends on extensive options and/or external data,
30 * then the implementing module can choose to provide a separate, global
31 * configuration page rather than per-text-editor settings. In that case, this
32 * form should provide a link to the separate settings page.
35 * An empty form array to be populated with a configuration form, if any.
36 * @param \Drupal\Core\Form\FormStateInterface $form_state
37 * The state of the entire filter administration form.
38 * @param \Drupal\editor\Entity\Editor $editor
39 * A configured text editor object.
42 * A render array for the settings form.
44 public function settingsForm(array $form, FormStateInterface $form_state, Editor $editor);