Index: openacs-4/packages/acs-core-docs/www/tutorial-wysiwyg-editor.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/tutorial-wysiwyg-editor.html,v diff -u -r1.9.2.5 -r1.9.2.6 --- openacs-4/packages/acs-core-docs/www/tutorial-wysiwyg-editor.html 19 Nov 2016 09:21:55 -0000 1.9.2.5 +++ openacs-4/packages/acs-core-docs/www/tutorial-wysiwyg-editor.html 6 Jan 2017 09:18:42 -0000 1.9.2.6 @@ -20,7 +20,7 @@ {after_html {<a name="#">Anchor</a>}}} } ... -
You must not give your your form the same name that your page 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
+
You must not give your your form the same name that your page 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:
{my_input_field_2:text
To:
@@ -31,7 +31,7 @@ take a look at thecr_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 + 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. @@ -44,7 +44,7 @@ set format [ template::util::richtext::get_property format $my_input_field_2] #This is optional
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 parameter
+ -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?