this module is compatible with drupal 9
CKEditor Line Height
Integrates CKEditor's Line Height plugin to Drupal's CKEditor implementation adding a new dropdown button to modify the line height of your content using inline style.
Requirements
CKEditor Module (Core)
Installation
Download the module
Enable it
Configure the CKEditor toolbar to include the dropdown button
The line heights are predefined, however, you can easily change that setting by implementing hook_editor_js_settings_alter for each format like so:
/**
* Implements hook_editor_js_settings_alter().
*/
function HOOK_editor_js_settings_alter(array &$settings) {
$settings['editor']['formats']['full_html']['editorSettings']['line_height'] = '1;2;3;4;5;6;7;8;9';
}if you want pixel base
/**
* Implements hook_editor_js_settings_alter().
*/
function HOOK_editor_js_settings_alter(array &$settings) {
$settings['editor']['formats']['full_html']['editorSettings']['line_height'] = '10px;22px';
}Above I'm setting the 'full_html' format to have only the 10px and 22px line height options. Please note that you can change the measuring unit from px to em for example.
Project information
Seeking co-maintainer(s)
Maintainers are looking for help reviewing issues.- Project categories: Content editing experience
7 sites report using this module
- Created by yuseferi on , updated
Stable releases for this project are covered by the security advisory policy.
There are currently no supported stable releases.
