Description
Typos and errors in hook_ckeditor_PLUGIN_plugin_check documentation
in site/web/core/modules/ckeditor/ckeditor.api.php
function hook_ckeditor_PLUGIN_plugin_check($format, $plugin_name) {
$toolbars = $format->editor_settings['toolbar'];
foreach ($toolbars as $toolbar['items'] as $row) {
if (in_array('Underline', $row)) {
return TRUE;
}
}
}
The foreach loop is completely wrong and also there are multiple $toolbars
available. Additionally, using $row
is confusing. $toolbar[$x]
is the row but then there are button groups defined inside those, so I'd suggest renaming it to $group
Pull request incoming.
Activity