Index: openacs-4/packages/acs-core-docs/www/tutorial-wysiwyg-editor.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/tutorial-wysiwyg-editor.adp,v diff -u -r1.1.2.3 -r1.1.2.4 --- openacs-4/packages/acs-core-docs/www/tutorial-wysiwyg-editor.adp 10 Jun 2016 07:35:08 -0000 1.1.2.3 +++ openacs-4/packages/acs-core-docs/www/tutorial-wysiwyg-editor.adp 23 Jun 2016 08:32:46 -0000 1.1.2.4 @@ -41,7 +41,7 @@

Warning

You must not give your your form the same name that your page -has. Otherwise HTMLArea won't load.

+has. Otherwise HTMLArea won't load.

Convert your textarea widget to a richtext widget and enable htmlarea.

The htmlarea_p-flag can be used to prevent WYSIWYG functionality. Defaults to true if left away.

From:

@@ -53,11 +53,13 @@
         
 

The richtext widget presents a list with two elements: text and content type. To learn more on existing content types search in -Google for "MIME-TYPES" or take a look at the cr_mime_types table.

Make sure that both values are passed as a list to your +Google for "MIME-TYPES" or take a look at the +cr_mime_types table.

Make sure that both values are passed as a list to your ad_form or you will have problems displaying the content or handling the data manipulation correctly.

Depending on the data model of your package you either support a -content format or don't. If you don't you can assume "text/html" or "text/richtext" or "text/enhanced".

The relevant parts in your ad_form +content format or don't. If you don't you can assume +"text/html" or "text/richtext" or "text/enhanced".

The relevant parts in your ad_form definition are the switches -new_data, -edit_data, -on_request and -on_submit.

To allow your data to display correctly you need to add an -on_request block. If you have the format @@ -74,8 +76,8 @@

Now the correct values for my_input_field_2 and format are passed to the -new_data and --edit_data blocks which don't need to get -touched.

To make HTMLArea optional per package instance define a string +-edit_data blocks which don't need to +get touched.

To make HTMLArea optional per package instance define a string parameter UseWysiwygP which defaults 0 for your package using the APM.

In your edit page make the following changes

         # Is WYSIWYG enabled?