| Quote: |
6. For the standard "display-as-you-go" approach, replace textarea HTML tags in modules and admin scripts with a PHP call to function wysiwyg_textarea with 5 arguments: textarea name, textarea value, the toolbar set name, textarea columns and textarea rows. For example, in modules/Submit_News/index.php:
echo "<br><br>"
."<b>"._STORYTEXT.":</b> ("._HTMLISFINE.")<br>
."<textarea cols=\"50\" rows=\"12\" name=\"story\"></textarea><br>";
becomes:
echo "<br><br>"
."<b>"._STORYTEXT.":</b> ("._HTMLISFINE.")<br>";
# ."<textarea cols=\"50\" rows=\"12\" name=\"story\"></textarea><br>"
wysiwyg_textarea("story", "", "NukeUser", "50", "12");
If there is a value between the <textarea> and </textarea>, tags, that should be specified as the second argument in the wysiwyg_textarea function call.
The 3rd argument defines the toolbar set, which controls which functions are available to the user. Since these functions can present security risks,
this should be chosen carefully. By default, the most limited toolset bar
will be chosen. In admin functions, you may choose to use PHPNukeAdmin which loads all FCKeditor functions. The NukeUser toolbar set is more limited, more secure and loads faster.
The textarea columns and rows are used in the event the WYSIWYG editor is turned off. Rows are used to control the height of the text editor when the WYSIWYG editor is on.
NOTE: The name of the first argument cannot contain reserved HTML tags, e.g. description contains SCRIPT. This requires that the fields be renamed.
|