[support] Definy theme for tinymce textarea.

Davide Michel 'ZioBudda' Morelli michel at ziobudda.net
Thu Jan 10 16:57:04 UTC 2008


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.

-- 
Michel 'ZioBudda' Morelli                       michel at ziobudda.net
Consulenza sistemistica in ambito OpenSource.
Sviluppo applicazioni web dinamiche (LAMP+Ajax)
Telefono: 0200619074
Telefono Cell: +39-3939890025 --  Fax: +39-0291390660

http://www.ziobudda.net                         ICQ: 58351764  
http://www.ziobuddalabs.it                      Skype: zio_budda
http://www.ajaxblog.it        			MSN: michel at ziobuddalabs.it                   
						JABBER: michel at gmail.com

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.drupal.org/pipermail/support/attachments/20080110/13fa3d91/attachment.htm 


More information about the support mailing list