1

Just to start with I am trying to do this in code (installation profile), not in Drupal itself.

In my installation profile I create three text formats. Thanks to the drush make file tinymce is also automaticly installed. Now wysiwyg gives you the option to assign the editor to a text format. See image below how the option looks in Drupal.

tinymce

Now I am wondering how I could change the 'No editor' to 'TinyMCE' in my installtion profile. After changing the option in drupal itself then the database changes to: (see image below)

tinymce_db

What is the right way to do this and how can I change these module settings?

0

Looking through the WYSIWYG modules' code when saving the form, it implements:

db_merge('wysiwyg')
  ->key(array('format' => 'full_html'))
  ->fields(array(
    'editor' => 'tinymce',
  ))
  ->execute();

So that's what I suspect you'll need to put into your install profile

1
  • Thanks, and you have any idea how to change settings, such as which button should be enabled in tinymce? EDIT: Never mind got it fixed, just copied the code from the database and added it to the fields like you did above. – mparryy Oct 30 '13 at 9:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.