Hi,

I am trying to configure tinymce through an installation profile. I need help on how I can go about creating a "tinymce profile" inside the drupal_my_profile_final() function.

Will just adding database entry help?

Thanks in advance,

Divya

Comments

divyadd’s picture

It wasn't as hard as I thought afterall!! Here's the code that goes into the drupal_profile_final() function to get tinymce up and running.

//Tinymce settings

   $edit = array();
   $edit['name'] = "Default";
   $edit['rids']= array (2 => 'authenticated user');
   array_keys((array) $edit['rids']);
   $edit['default'] = "true";
   $edit['buttons'] = array(
                'default-bold' => 'true',
                'default-italic' => 'true',
                'auto-save' => 'true',
                'default-underline' => 'true',
                'default-justifyleft' => 'true',
                'default-justifycenter' => 'true',
                'default-justifyright' => 'true',
                'default-justifyfull' => 'true',
                'default-bullist' => 'true',
                'default-numlist' => 'true',
                'default-outdent' => 'true',
                'default-indent' => 'true',
                'default-undo' => 'true',
                'default-link' => 'true',
                'default-unlink' => 'true',
                'default-image' => 'true',
                'default-forecolor' => 'true',
                'default-backcolor' => 'true',
                'default-hr' => 'true',
                'default-cut' => 'true',
                'default-copy' => 'true',
                'default-paste' => 'true',
                'buttons-buttons' => 'true',
                'flash-flash' => 'true',
                'font-formatselect' => 'true',
                'font-fontselect' => 'true',
                'iespell-iespell' => 'true',
                'preview-preview' => 'true',
                'print-print' => 'true'
                );
   $form_value = $edit['buttons'];
   $edit['toolbar_loc'] = "top";
   $edit['toolbar_align'] = "left";
   tinymce_profile_validate($edit);
   tinymce_profile_save($edit);
divyadd’s picture

Status: Active » Fixed
Anonymous’s picture

Status: Fixed » Closed (fixed)