Skip to content

Fix typos in hook_ckeditor_PLUGIN_plugin_check documentation #6821

Open
backdrop/backdrop
#4991
@bennybobw

Description

@bennybobw

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions