Fender963
06-30-2007, 10:53 PM
Hey all,
I am using the WYSIWYG editor on a custom template of mine and it seems to be working just fine except for the paragraph formatting.
I have two pages: start.php and end.php
Start.php has:
//Build Editor
require_once(DIR . '/includes/functions_editor.php');
$show['wysiwyg'] = ($setting['allow_bbcode'] ? is_wysiwyg_compatible() : 0);
$istyles_js = construct_editor_styles_js();
$show['qr_require_click'] = 0;
$editorid = construct_edit_toolbar($Message, 0, '', 0, 1, 1);
$messagearea = "
<script type=\"text/javascript\">
<!--
var require_click = false;
var threaded_mode = 1;
var is_last_page = false;
// -->
</script>
$messagearea";
and end.php would be something simple like:
require_once('./includes/functions_wysiwyg.php');
$message = convert_wysiwyg_html_to_bbcode($vbulletin->input->clean_gpc('p','message',TYPE_NOTRIM));
$message = $vbulletin->db->escape_string($message);
which I would then insert into my database.
When I parse it I do:
//Parse BBCode
require_once(DIR . '/includes/class_bbcode.php');
$parser =& new vB_BbCodeParser($vbulletin, fetch_tag_list());
$Description = $parser->do_parse($Message);
$Message is pulled straight from the Table.
Everything works fine like bold and quote tages etc... however the formatting of the paragraphs seems to somehow get discarded.
So if I type:
This is paragraph 1.
THis is paragraph 2
It would end up like this (in the database too)
This is paragraph 1. This is Paragraph 2
Any ideas?
Thank you,
Kyle
I am using the WYSIWYG editor on a custom template of mine and it seems to be working just fine except for the paragraph formatting.
I have two pages: start.php and end.php
Start.php has:
//Build Editor
require_once(DIR . '/includes/functions_editor.php');
$show['wysiwyg'] = ($setting['allow_bbcode'] ? is_wysiwyg_compatible() : 0);
$istyles_js = construct_editor_styles_js();
$show['qr_require_click'] = 0;
$editorid = construct_edit_toolbar($Message, 0, '', 0, 1, 1);
$messagearea = "
<script type=\"text/javascript\">
<!--
var require_click = false;
var threaded_mode = 1;
var is_last_page = false;
// -->
</script>
$messagearea";
and end.php would be something simple like:
require_once('./includes/functions_wysiwyg.php');
$message = convert_wysiwyg_html_to_bbcode($vbulletin->input->clean_gpc('p','message',TYPE_NOTRIM));
$message = $vbulletin->db->escape_string($message);
which I would then insert into my database.
When I parse it I do:
//Parse BBCode
require_once(DIR . '/includes/class_bbcode.php');
$parser =& new vB_BbCodeParser($vbulletin, fetch_tag_list());
$Description = $parser->do_parse($Message);
$Message is pulled straight from the Table.
Everything works fine like bold and quote tages etc... however the formatting of the paragraphs seems to somehow get discarded.
So if I type:
This is paragraph 1.
THis is paragraph 2
It would end up like this (in the database too)
This is paragraph 1. This is Paragraph 2
Any ideas?
Thank you,
Kyle