Implements \Drupal\ckeditor\Plugin\CKEditorPluginInterface::getConfig().
Overrides CKEditorPluginInterface::getConfig
public function getConfig(Editor $editor) {
// Reasonable defaults that provide expected basic behavior.
$config = array(
'customConfig' => '',
// Don't load CKEditor's config.js file.
'pasteFromWordPromptCleanup' => TRUE,
'removeDialogTabs' => 'image:Link;image:advanced;link:advanced',
'resize_dir' => 'vertical',
'keystrokes' => array(
// 0x11000 is CKEDITOR.CTRL, see http://docs.ckeditor.com/#!/api/CKEDITOR-property-CTRL.
array(
0x110000 + 75,
'link',
),
array(
0x110000 + 76,
NULL,
),
),
);
// Next, add the format_tags setting, if its button is enabled.
$toolbar_buttons = array_unique(NestedArray::mergeDeepArray($editor->settings['toolbar']['buttons']));
if (in_array('Format', $toolbar_buttons)) {
$config['format_tags'] = $this
->generateFormatTagsSetting($editor);
}
return $config;
}