Here is a little code snippet to be added in a .module file. /** * Implements hook_editor_js_settings_alter(). * * {@inheritdoc} */ function MODULE_editor_js_settings_alter(array &$settings) { foreach ($settings[‘editor’][‘formats’] as $name => $value) { // Use instead of on enter. // See: https://docs.ckeditor.com/ckeditor4/latest/api/CKEDITOR.html#property-ENTER_BR. // CKEditor natively converts double into on rendering. $settings[‘editor’][‘formats’][$name][‘editorSettings’][‘enterMode’] = ‘2’; } } Additional …
Continue reading “[Drupal] Change CKEditor behaviour for line breaks (br or p)”