Hi all. I have defined a profile into "tinymce settings" called "newsimple". I want link it with some textarea.
I know that there is some type of "hook" |phptemplate_tinymce_theme()|:
function phptemplate_tinymce_theme($init, $textarea_name, $theme_name, $is_running) { dpm("Textarea: $textarea_name"); switch ($textarea_name) { case 'comment': case 'message': case 'log': //Segnalazione problema manuale case 'submitted-segnalazione-testo': case 'access-page': unset($init); break; default: break; }
//Descrizione manuale. if (arg(0) == 'node' && arg(1) == 'add' && (arg(2) == 'manuali-file' || arg(2) == 'manuali-link') && $textarea_name == 'body') { //unset($init); $init['theme'] = 'newsimple'; foreach ($init as $k => $v) { if (strstr($k, 'theme_advanced_')) unset($init[$k]); } } dpr($init); return $init; }
This code come from Drupal,org, but does not works: it's like that the 'newsimple' theme is not found from this function so no tinymce is displayed. Where is my error ?
Tnx M.