Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
I active wysiwyg module and then i install the ckeditor as well.
I try to put the ckeditor mathjax plugin, but it doesn't work by a module. My module is this
<?php
/**
* Implements hook_wysiwyg_plugin().
*/
function ckeditor_mathjax_wysiwyg_plugin($editor, $version) {
switch ($editor) {
case 'ckeditor':
return array(
'mathjax' => array( // Internal plugin name
'extensions' => array(
'mathjax' => t('mathjax'), // Internal plugin name as key, name visible in editor profile config UI as value.
),
'load' => TRUE,
'internal' => FALSE,
'path' => wysiwyg_get_path('ckeditor_plugins') . '/mathjax',
),
);
break;
}
}
?>
In the html source it appears that the mathjax library is inserted in html code, but it don't load any button.
Thanks in advanced
Comments
Comment #1
xarbot CreditAttribution: xarbot commentedComment #2
TwoDThe plugin definition you've made says 'mathjax' is an extension, and by definition has no buttons.
Change it into this:
and try again. For widget plugins, CKEditor capitalizes the widget name and uses it for the internal button name, which is why I changed 'mathjax' to 'Mathjax' there.
Also make sure the plugins required by this widget are available as well.
Comment #3
xarbot CreditAttribution: xarbot commentedIt works as well, thanks
Xarbot
Comment #4
TwoDGlad I could help!