PDA

View Full Version : BBcode for WYSWYG


Princeton
01-23-2004, 07:33 PM
I got a [TABLE] bbcode working and I would like to have this work on the wysiwyg. My question is which files would I have to modify to get this to work (similar to the [B], [CENTER], [URL], etc, etc bbcodes that currently work with the wysiwyg).

I know I'll probably won't get much help on this but I thought I'd post here before posting @ vbulletin.com.

thank you

Zachery
01-23-2004, 07:53 PM
I got a [TABLE] bbcode working and I would like to have this work on the wysiwyg. My question is which files would I have to modify to get this to work (similar to the [B], [CENTER], [URL], etc, etc bbcodes that currently work with the wysiwyg).

I know I'll probably won't get much help on this but I thought I'd post here before posting @ vbulletin.com.

thank you
i dont see why it wouldnt work on the wysiwyg

Princeton
01-23-2004, 07:58 PM
Sorry, I probably wasn't clear enough ...
The bbcode [TABLE] does work if I insert [TABLE] directly into wysiwyg; but, that is not what I am asking. I want the [TABLE] bbcode to render similar to the bold, italic, indent, etc, etc. tags ... I want it to be a true wysiwyg.

Zachery
01-23-2004, 08:47 PM
if you did the BBcode correctly i dont see why it wouldnt work...

Princeton
01-23-2004, 08:54 PM
type something in the quickreply (wysiwyg) ... highlight the text and click B; this will convert all text to bold lettering (what you see is what you get)

now, highlight the text and click https://vborg.vbsupport.ru/external/2008/11/25.gif ... you will see that it wraps the text with [quote.] tags. This is not what I want.

I would like the [TABLE] bbcode to work similar to the B button.

:D

NTLDR
01-23-2004, 08:57 PM
Have you added a button for it in the BB Code Manager?

Princeton
01-23-2004, 09:13 PM
the button will just wrap the text with the bbcode ... this is not what I want.
I want it to actually build the table (visually).

To make this work, I need to modify a few files. I was hoping that somebody would know which files to edit.

I do know that most of the work is done via client-side before sending it to the database (at least the Midas (gecko) version does) ... I think.

When you use bold within the wysiwyg, the editor saves this as bold. I would like to enable the wysiwyg editor to do the same with the [table] bbcode.

PS. The table tag can have multiple rows and/ or columns.

NTLDR
01-23-2004, 09:20 PM
From what I understand, I don't use or even have WYSIWYG enabled on any of my sites, is that the text thats formated in the text area is all HTML, ie pressing B generates <b>text</b> in the editor and then convert_wysiwyg_html_to_bbcode() is run when submitting the post (the function is in functions_wysiwyg.php) to convert the HTML to BB Code as the name suggests.

This is all just am assumption though, but gives you somewhere to look at least :)

---

Edited to add: Also take alook at the JS file for the WYSIWYG editor, that probably performs all the client side processing.

Princeton
01-23-2004, 09:45 PM
ahhh .... that's a good place to start. thank you