Log in

View Full Version : Add WYSIWYG-Editor


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 :(

cscgal
04-20-2006, 01:45 AM
Don't you want to convert_wysiwyg_html_to_bbcode when the wysiwyg variable DOES exist? You have that ! symbol in your if clause.

sllik
10-06-2006, 06:55 PM
I also have the same problem...

MaryTheG(r)eek
01-06-2007, 04:52 PM
Hello,

I just post a tutorial for it at vb Programming articles:
https://vborg.vbsupport.ru/showthread.php?t=135708

Cheers
Maria