[thelist] SPAW Online WYSIWYG Editor

ahmed azzouzi ahmed.azzouzi at gmail.com
Sat Dec 25 06:30:24 CST 2004


This is an example of dynamic generated spaw editor instances (could
be used in a loop) used in articles creation, meaning we have at least
2 instances of the editor per page : 'title', 'content'.
You can see that the field content stored in your db is $row->content
and that the name of the editor is dynamic too ("'richeditor_'.$item)
where $item is 'title' or 'content'.
You can therefore retrieve the content after submission (post) with
the $_POST['richeditor_content'] variable.

step1 : for display:
eval( "\$myForm_".$item ." = new
SPAW_Wysiwyg(\$control_name=\"richeditor_".$item."\",
\$value=\"".$item_value."\", \$lang='', \$mode = '', \$theme='',
\$width='100%', \$height='".$height."', \$css_stylesheet='',
\$dropdown_data='',null,null);");
eval("\$myForm_".$item."->show();");
step2 : after post.
$_POST['richeditor_title']
$_POST['richeditor_content']

Hope this helps


More information about the thelist mailing list