Updated to Drupal 8.5. Core Media not yet in use.
[yaffs-website] / vendor / chi-teck / drupal-code-generator / templates / d8 / hook / editor_js_settings_alter.twig
diff --git a/vendor/chi-teck/drupal-code-generator/templates/d8/hook/editor_js_settings_alter.twig b/vendor/chi-teck/drupal-code-generator/templates/d8/hook/editor_js_settings_alter.twig
new file mode 100644 (file)
index 0000000..7127071
--- /dev/null
@@ -0,0 +1,9 @@
+/**
+ * Implements hook_editor_js_settings_alter().
+ */
+function {{ machine_name }}_editor_js_settings_alter(array &$settings) {
+  if (isset($settings['editor']['formats']['basic_html'])) {
+    $settings['editor']['formats']['basic_html']['editor'] = 'MyDifferentEditor';
+    $settings['editor']['formats']['basic_html']['editorSettings']['buttons'] = ['strong', 'italic', 'underline'];
+  }
+}