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.2 -r1.9.2.3 --- openacs-4/packages/acs-core-docs/www/tutorial-wysiwyg-editor.html 9 Jun 2016 08:44:50 -0000 1.9.2.2 +++ openacs-4/packages/acs-core-docs/www/tutorial-wysiwyg-editor.html 10 Jun 2016 07:35:08 -0000 1.9.2.3 @@ -57,34 +57,34 @@ set htmlarea_p $use_wysiwyg_p
All you need now is a configuration page where the user can change this setting. Create a
configure.tcl
file:
- ad_page_contract { +ad_page_contract { - This page allows a faq admin to change the UseWysiwygP setting + This page allows a faq admin to change the UseWysiwygP setting - } { - {return_url ""} - } +} { + {return_url ""} +} - set title "Should we support WYSIWYG?" - set context [list $title] + set title "Should we support WYSIWYG?" + set context [list $title] - set use_wysiwyg_p + set use_wysiwyg_p - ad_form -name categories_mode -form { - {enabled_p:text(radio) - {label "Enable WYSIWYG"} - {options {{Yes t} {No f}}} - {value $use_wysiwyg_p} - } - {return_url:text(hidden) {value $return_url}} - {submit:text(submit) {label "Change"}} - } -on_submit { - parameter::set_value -parameter "UseWysiwygP" -value $enabled_p - if {$return_url ne ""} { - ns_returnredirect $return_url - } - } -
In the corresponding ADP file write
+ ad_form -name categories_mode -form { + {enabled_p:text(radio) + {label "Enable WYSIWYG"} + {options {{Yes t} {No f}}} + {value $use_wysiwyg_p} + } + {return_url:text(hidden) {value $return_url}} + {submit:text(submit) {label "Change"}} + } -on_submit { + parameter::set_value -parameter "UseWysiwygP" -value $enabled_p + if {$return_url ne ""} { + ns_returnredirect $return_url + } + } +
In the corresponding ADP file write
<master> <property name="title">@title@</property> <property name="context">@context@</property>