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
Comment #1
anon