4

In Drupal 8.2, this worked:

function MYMODULE_editor_js_settings_alter(array &$settings) {
  if (isset($settings['editor']['formats']['simple_formatted_text'])) {
    $settings['editor']['formats']['simple_formatted_text']['editorSettings']['height'] = 80;
  }
}

This stopped affecting the height in Drupal 8.3.

CKEditor 4 documentation mentions using config.width and config.height. It seems like I just need to find the right part of the $settings array to add a height property. Inside editorSettings there is a customConfig item which is a string. I've tried some things in there but haven't landed on something that works yet.

1
  • 1
    AFAIK, the Autogrow plugin was brought into Drupal 8.3 for CKEditor which should let you set a minimum height as well as "grow" with the editor as content is added. If that is not sufficient, I had a module up until now - I do not know if there is feature parity with it or if this still works in 8.3: drupal.org/project/autogrow – Kevin Apr 15 '17 at 21:27

Browse other questions tagged or ask your own question.