MrNase
08-05-2005, 09:18 AM
Hello!
Can someone explain to me how I can add the WYSIWYG-Editor to my script?
Here's what I have right now (very simplified):
if ($_REQUEST['do'] == 'edit') {
construct_edit_toolbar($data['text'],0,0,1,1,0);
}
if ($_POST['do'] == 'edit') {
if (!$vbulletin->GPC['wysiwyg']) {
require_once(DIR . '/includes/functions_wysiwyg.php');
$text = convert_wysiwyg_html_to_bbcode($vbulletin->GPC['message'], 0);
}
else
{
$text =& $vbulletin->GPC['message'];
}
}
Iam not sure what variables to use..
The editor shows up correctly, I have LiveHTTPHeaders installed and it shows me that $text doesn't exist and $message is empty..
The best would be if someone has a detailed how-to for me..
Strange.. I changed it to:
construct_edit_toolbar($message,0,1,1,1,0);
which means 'forumid' == 1 and the text get's saved into the database but the editor doesn't show up anymore :(
Can someone explain to me how I can add the WYSIWYG-Editor to my script?
Here's what I have right now (very simplified):
if ($_REQUEST['do'] == 'edit') {
construct_edit_toolbar($data['text'],0,0,1,1,0);
}
if ($_POST['do'] == 'edit') {
if (!$vbulletin->GPC['wysiwyg']) {
require_once(DIR . '/includes/functions_wysiwyg.php');
$text = convert_wysiwyg_html_to_bbcode($vbulletin->GPC['message'], 0);
}
else
{
$text =& $vbulletin->GPC['message'];
}
}
Iam not sure what variables to use..
The editor shows up correctly, I have LiveHTTPHeaders installed and it shows me that $text doesn't exist and $message is empty..
The best would be if someone has a detailed how-to for me..
Strange.. I changed it to:
construct_edit_toolbar($message,0,1,1,1,0);
which means 'forumid' == 1 and the text get's saved into the database but the editor doesn't show up anymore :(