Is there any way to add the css class to tinymce inside wysiwyg editor I have several classes defined inside style.css, I want tinymce to recognize these classes. Below is the popup to configure hyperlinks. It also provide a way to use css styles defined already.



I am looking for a way to add the css class to tinymce inside wysiwyg editor in Drupal 7.
As you are using wysiwyg module with tinymce library. You should implement the alter function provided by wysiwyg module to add the editor settings.

For tinymce 4.x:

function MYMODULE_wysiwyg_editor_settings_alter(&amp;$settings, $context) {
  if ($context['profile']-&gt;editor == 'tinymce') {
    $settings['link_class_list'] = array(
      "Class Example" =&gt; "class-example",
    );
  }
}


For tinymce 3.x:

function MYMODULE_wysiwyg_editor_settings_alter(&amp;$settings, $context) {
  if ($context['profile']-&gt;editor == 'tinymce') {
    $settings['theme_advanced_styles'] = array(
      "Class Example" =&gt; "class-example",
    );
  }
}


References


documentation of tinymce 4.x
documentation of tinymce 3.x
API of wysiwyg