Just tried this on another project.

use hook_wysiwyg_editor_settings_alter()

Make this more sustainable.

if ($context['profile']->editor == 'ckeditor') {
    $button_exists = isset($context['profile']->settings['buttons']['linkit']);
    if (!empty($context['profile']->settings['default_toolbar_grouping']) && $button_exists) {
      foreach ($settings['toolbar'] as &$group) {
        if ($group['name'] == 'links') {
          array_unshift($group['items'], 'linkit');
        }
        if ($group['name'] == 'other') {
          if (in_array('linkit', $group['items'])) {
            unset($group['items'][array_search('linkit', $group['items'])]);
            // Regenerate the keys.
            $group['items'] = array_values($group['items']);
          }
        }
      }
    }
  }

Comments

anon’s picture

Status: Active » Fixed

  • Commit 83e3ee6 on 7.x-3.x by anon:
    Fixed #2149339 - Add Linkit to the links toolbar group.
    

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.