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.8 -r1.9 --- openacs-4/packages/acs-core-docs/www/tutorial-wysiwyg-editor.html 11 Dec 2010 23:36:32 -0000 1.8 +++ openacs-4/packages/acs-core-docs/www/tutorial-wysiwyg-editor.html 27 Oct 2014 16:39:28 -0000 1.9 @@ -1,8 +1,8 @@ -Enabling WYSIWYG

Enabling WYSIWYG

by Nima Mazloumi

+Enabling WYSIWYG

Enabling WYSIWYG

by Nima Mazloumi

OpenACS docs are written by the named authors, and may be edited by OpenACS documentation staff. -

Most of the forms in OpenACS are created using the form builder, see Using Form Builder: building html forms dynamically. For detailed information on the +

Most of the forms in OpenACS are created using the form builder, see ???. 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:

@@ -80,7 +80,7 @@
     	{submit:text(submit) {label "Change"}}
 	} -on_submit {
     	parameter::set_value  -parameter "UseWysiwygP" -value $enabled_p
-    	if {![empty_string_p $return_url]} {
+    	if {$return_url ne ""} {
         	ns_returnredirect $return_url
     	}
 	}
@@ -95,5 +95,5 @@
 	set return_url [ad_conn url]
 
 	#ADP:
-	<a href=configure?<%=[export_url_vars return_url]%>>Configure</a>
+	<a href=configure?<%=[export_vars -url {return_url}]%>>Configure</a>
 	
View comments on this page at openacs.org