TRUE]; } /** * {@inheritdoc} */ public function settingsForm(array $form, FormStateInterface $form_state, Editor $editor) { $form['ponies_too'] = [ '#title' => t('Pony mode'), '#type' => 'checkbox', '#default_value' => TRUE, ]; return $form; } /** * {@inheritdoc} */ public function getJSSettings(Editor $editor) { $js_settings = []; $settings = $editor->getSettings(); if ($settings['ponies_too']) { $js_settings['ponyModeEnabled'] = TRUE; } return $js_settings; } /** * {@inheritdoc} */ public function getLibraries(Editor $editor) { return [ 'editor_test/unicorn', ]; } }