How to set TinyMCE as default editor for new users
Purpose
When adding a new user the default wysiwyg editor for this user is set to Kupu. This howto will show you how you can set the default editor to TinyMCE.
Prerequisities
This howto assumes you have basic knowledge of theming and customizing a Plone site.
Step by step
The default user properties are set using GenericSetup when you add a user. The properties are stored in a file called memberdata_properties.xml and looks like this:
<?xml version="1.0"?> <object name="portal_memberdata" meta_type="Plone Memberdata Tool"> <property name="email" type="string"></property> <property name="portal_skin" type="string"></property> <property name="listed" type="boolean">True</property> <property name="login_time" type="date">2000/01/01</property> <property name="last_login_time" type="date">2000/01/01</property> <property name="fullname" type="string"></property> <property name="error_log_update" type="float">0.0</property> <property name="home_page" type="string"></property> <property name="location" type="string"></property> <property name="description" type="text"></property> <property name="language" type="string"></property> <property name="ext_editor" type="boolean">False</property> <property name="wysiwyg_editor" type="string">Kupu</property> <property name="visible_ids" type="boolean">False</property> </object>
As you can see the wysiwyg_editor property is set to Kupu. If we want to set this to TinyMCE we can add a memberdata_properties.xml file to the default profile of our Plone theme product. Since we only want to modify the wysiwyg_editor field we will set purge to false so all the other properties are taken from the default memberdata_properties.xml file. Our memberdata_properties.xml will look like this:
<?xml version="1.0"?> <object name="portal_memberdata" meta_type="Plone Memberdata Tool" purge="False"> <property name="wysiwyg_editor" type="string">TinyMCE</property> </object>
When reinstalling your product all new users will be created with TinyMCE set as wysiwyg editor.
Further information
More information about GenericSetup can be found in the tutorial Understanding and Using GenericSetup in Plone.
