I use drush_make to gather my drupal 7 installation. I also get CKEditor automatically. But I am struggling to find out, how I can use the install profile to set it up automatically?
Here I get the files:
http://github.com/lsolesen/larsolesen.dk/blob/master/larsolesen_dk.make
libraries[ckeditor][download][type] = "get"
libraries[ckeditor][download][url] = "http://download.cksource.com/CKEditor/CKEditor/CKEditor%203.4.1/ckeditor..."
libraries[ckeditor][directory_name] = "ckeditor"
libraries[ckeditor][destination] = "libraries"
I have an .install file based on standard, but cannot find any docs on how to setup the editor, e.g. choose it and configure it, during the install process.
My install file is here:
http://github.com/lsolesen/larsolesen.dk/blob/master/larsolesen_dk.install
Thanks in advance.
Comments
Bump
Anybody know this?
Look how settings are saved in wysiwyg module
I need to find out how the settings are saved in th wysiwyg module. I found out, that I think I need the
function wysiwyg_profile_form_submit($form, &$form_state) {} from wysiwyg.admin.inc. However, I cannot find what $form_state is? And which stuff should go in form to save which buttons to show? And finally, how to even choose the appropriate editor for the different html outputs (filtered / unfiltered / plain).
Nobody else struggling with
Nobody else struggling with this?
I'm also interested in an
I'm also interested in an answer to this -
WYSIWYG has a data table containing settings
Check the contents of the wysiwyg table after configuring your site. The configration data is serialized, you can use something like http://www.functions-online.com/unserialize.html to take a look, but a SQL dump from that table and subsequent import in your install profile (AFTER installing wysiwyg module!) should preserve settings.
SQL dump follows for simple base configuration.
Try this method
You probably solved it by now but here is a a method for this if someone else also are thinking about this. I've stole it from Openpublic my self. Look into openpublic_defaults.install to find more ideas about installation profiles.
Hi, I am struggling with this
Hi, I am struggling with this for a long time, ideally I'd like a Feature to take care of configuring text editors but I have given up on that.
Would you have a tip for me to find appropriate code for my installation profile for Drupal 6?
Thanks in advance, appreciate any help!
----
"People make mistakes. To really mess something up you need a computer."
my approach
Here are a few more details that may help. First, setup Drupal and WYSIWYG with CK and then configure your options.
Then, get what you did from the database.
It will look nasty like this.
Copy the serialized piece and run this with php.
This gives you the serialized options back as code. Then you can paste that into your profile.
So that will push the values back into the database within your profile. In this case, it also sets the editor for filtered to be ckeditor.
I selected all options within CK thinking it would be nice to turn them on and off within the code. If you simple remove line items it will turn options off.
Thanks!
Thanks for the great info.
Only thing I would recommend is using the db_insert function instead of db_query for Drupal 7
Using the WYSIWYG module on forms within the install tasks
The above has helped me greatly and I want to first thank you for sharing it.
I'm wondering if it is possible to use the CKEditor during an install tasks with its buttons, etc showing. I have my module setup that supplies the form, which is part of my dependencies in the profile's .info file. I listed WYSIWYG as a dependency before any others, not sure if that implies the order they are activated or if that would matter at all. When I get to the install task form, I am met with a plain textarea where the field's '#type' is set to 'text_format' and '#format' is set to 'full_html'. This displays as expected on the module configuration screen, after Drupal installation is complete.
Currently I am exploring documentation on installation profiles and examples, but I thought I would ask here since this thread has gotten me so close. I will definitely post the solution if I find it on my own. Any ideas?