Hi,

I've been searching for the reason why the beautiful CKeditor Link module is not showing the "Internal path" option in the WYSIWYG editor. The reason was an extra included plugin for counting words shown on the bottom of of the editor - sites/all/libraries/ckeditor/plugins/counter/plugin.js.

This was included like:

function MODULE_wysiwyg_editor_settings_alter(&$settings, $context) {
  if ($context['profile']->editor == 'ckeditor') {
    $settings['customConfig'] = '/sites/all/libraries/ckeditor/config.js';
    $settings['extraPlugins'] = 'counter';
  } 
}

and working well. If this plugin is enabled, the INTERNAL PATH option is not shown at the linking dialog. If it is commented out, there are no further issues.

Any ideas why this happens? does this occurs also when adding other plugins?
Thank you.

CommentFileSizeAuthor
counter.zip1.06 KBflefle

Comments

flefle’s picture

Correction:

any extra plugin will disable the showing of the INTERNAL PATH option where the extra plugin is working fine.
Any ideas?

anrikun’s picture

Category: bug » support

This is not a bug report but a support request.
'extraPlugins' might not be the right way to add your plugin here. I will have a look at this.

flefle’s picture

My bad, sorry for that but for the record I would like to explain what happened there:

There is a beautiful hook that can manipulate extra plugins. In case of multiple custom plugins, the function should look like:

function MODULE_wysiwyg_editor_settings_alter(&$settings, $context) {
  if ($context['profile']->editor == 'ckeditor') {
    $settings['customConfig'] = '/sites/all/libraries/ckeditor/config.js';
    $settings['extraPlugins'] .= ',counter';
  }
}

I've erased the previous "drupal_path" plugin and overwritten it with my counter plugin so only one of them worked. Pay attention at the way how you define multiple plugins while they should be: plugin1,plugin2,plugin3 without space after the comma and not as array.

Sorry for bothering :]

flefle’s picture

Status: Active » Closed (fixed)

While this is cleared and recorded, I'm closing this thread (issue).