by Nima Mazloumi
+
Enabling WYSIWYGMost of the forms in OpenACS are created using the form builder, see the section called “Using Form Builder: building html forms dynamically”. For detailed information on the
API take a look here.
The following section shows how you can modify your form to allow WYSIWYG functionalities.
Convert your page to use ad_form
(some changes but worth it)
Here an examples. From:
template::form create my_form
template::element create my_form my_form_id -label "The ID" -datatype integer -widget hidden
@@ -20,7 +20,7 @@
{after_html
{<a name="#">Anchor</a>}}}
} ...
-
Warning
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
+
Warning
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: