Topic: WYSYWYG BBCode Editor
I'm making a WYSIWYG (what you see is what you get) mod for PunBB. Does anyone know of a good WYSIWYG BBCode editor? (Usually WYSIWYG editors edit HTML, but I want to edit BBCode.)
You are not logged in. Please login or register.
PunBB Forums → General discussion → WYSYWYG BBCode Editor
I'm making a WYSIWYG (what you see is what you get) mod for PunBB. Does anyone know of a good WYSIWYG BBCode editor? (Usually WYSIWYG editors edit HTML, but I want to edit BBCode.)
It is hard to make it if you want to compatble with all browser, BTW goto www.hotscripts.com www.phpclasses.org
you might be better starting with a html one, cutting out the stuff that can't be done with bbcode, then making a thing that converts it afterwards
That's what I thought of doing. I'd have to find a separate BBCode parser to convert it to/from HTML (say if someone wants to edit it).
well you don't need to to html... punbb does that already
I want to use TinyMCE for the WYSIWYG part. It does HTML, which, oh, nevermind. parser.php can be edited to parse html tags. Maybe by next week, I could have my mod done, and be less of a PHP newbie.
parser.php doen't need to parse html, html is parsed by the browser unless you mean parse the post into bbcode
Ok. I;m going to keep [ quote] and [ code] as BBCode tags, and probably make the parser parse the HTML into HTML. And, no, the <marquee> element will not be used.
I'm going to mod the parser to allow HTML in addition to BBCode. The WYSIWYG Editor (preferably released under the LGPL) will have buttons for only certain elements (namely those that BBCodes translate to). If someone tries to use a bad element in the source code, it won't work.
It rocks & is a perfect fit for Pun! http://www.themaninblue.com/experiment/widgEditor/
I had thought about HTML to BBcoding it, found Rickard's BBcode mod first though.
A few input button styles & Voila!
cheers
scotty what do you plan to do to stop "nasty" html?
scotty what do you plan to do to stop "nasty" html?
Widg does a nice job w/the nasties
By nasty HTML, do you mean JavaScript installing spyware? Well, in that case, I will have the parser modded to only allow certain "good" HTML.
Example:
<strong> </strong> / <b> </b>
<em> </em> / <i> </i>
<u> </u>
<a href="http:// "> </a> / <a href="https:// "> </a> / <a href="ftp:// "> </a> / <a href="mailto: "> </a> / <a href="irc:// "> </a>
<img src=" " alt=" " /> / <img src=" " alt=" "> / <img alt=" " src=" " /> / <img alt=" " src=" ">
<del> </del> / <strike> </strike>
<table> </table>
<caption> </caption> (converts to <div align="center"> </div>)
<tr> </tr>
<th> </th>
<td> </td>
<ul> </ul>
<ol> </ol>
<li> </li>
<div style=" "> </div>
<div align=" "> </div>
<div align=" " style=" "> </div> / <div style=" " alt=" ">
<h> </h> (converts to <div style="background-color: #FFFF00; color: #000000"> </div>)
and maybe other reasonable HTMLs.
Notes:
1. Only certain ATTRIBUTES are allowed as well (to thwart the use of onClick, onMouseOver, or basically on* and any other disallowed attributes).
2.
Well, what if someone wants a hyperlink that, when clicked, displays a JavaScript dialog?
Well, I'll consider that.
I meant nasties as in NON-valid markup, like <div align="center">, font tag soup etc.
.js exploits too though
Widg did a great job keeping things valid, in the limited tests I've done...
cheers
what if someone does
<div style="position:absolute; top: 0px; left: 0px; width: 10000px; height: 10000px; background-color:red">Whoops</div>
Connorhd,
have you looked at Widg?
Am curious what some others think? I was impressed with the minimalist design & its performance.
P.S. it uses a really cool way to do image button rollovers w/css too. (editor buttons) check it out!
cheers
yeh i looked at it, however it doesn't do very much (i guess you could extend it) but it looks like a bit of a waste of time to me, it doesn't do enough to make it worth while
thats what I liked about it
I meant nasties as in NON-valid markup, like <div align="center">, font tag soup etc.
.js exploits too though
Widg did a great job keeping things valid, in the limited tests I've done...
cheers
<div align=center> is invalid?
AFAIK it is?
I'd use...
<div style="text-align:center;"></div>
as far as i know and hes right
The "align" attribute of the div element was deprecated in HTML 4.01.
The "align" attribute of the div element is not supported in XHTML 1.0 Strict DTD.
also like i asked before what if someone does
<div style="position:absolute; top: 0px; left: 0px; width: 10000px; height: 10000px; background-color:red">Whoops</div>
It makes a big red page 10000 px wide and 10000 px high with the word "Whoops" on it. At least that's how it is in Firefox.
well, i don't really want people to be able to do that
lol
allowing html on a forum, is just askin' for it
PunBB Forums → General discussion → WYSYWYG BBCode Editor
Powered by PunBB, supported by Informer Technologies, Inc.