you may look at this mod:
http://www.phpbb.com/community/viewtopi ... &t=2160273
[RFC] WYSIWYG editor
-
- Registered User
- Posts: 2
- Joined: Sat Apr 06, 2013 7:34 am
Re: [RFC] WYSIWYG editor
As far as allowing HTML, a whitelist-only, validating parser shouldn't be impossible to write. I know it's been done already with some success in Python, so I see no reason it can't also be done on PHP. https://github.com/jsocol/bleach - that one has an aggressive approach that escapes anything it doesn't expect to see, and IIRC it's fully aware of clever tricks like using entities and odd unicode sequences and such to slip things through.
Parsing and rewriting the HTML rather than filtering it seems to be the way to go here....
Parsing and rewriting the HTML rather than filtering it seems to be the way to go here....
- EXreaction
- Registered User
- Posts: 1555
- Joined: Sat Sep 10, 2005 2:15 am
Re: [RFC] WYSIWYG editor
Using a HTML whitelist is essentially the same thing as bbcode, just using <> tags rather than [].
- Pony99CA
- Registered User
- Posts: 986
- Joined: Sun Feb 08, 2009 2:35 am
- Location: Hollister, CA
- Contact:
Re: [RFC] WYSIWYG editor
Not really.EXreaction wrote:Using a HTML whitelist is essentially the same thing as bbcode, just using <> tags rather than [].
First, the Admin has to create the BBCodes, so that means he has to know at least a little HTML instead of just selecting which tags he cares about or wants to leave out.
Second, HTML supports optional attributes, something BBCode does not.
For example, consider writing a set of TABLE BBCodes as opposed to just checking the TABLE, TH, TR, TD, etc. tags from a list.
Steve
Silicon Valley Pocket PC (http://www.svpocketpc.com)
Creator of manage_bots and spoof_user (ask me)
Need hosting for a small forum with full cPanel & MySQL access? Contact me or PM me.
Creator of manage_bots and spoof_user (ask me)
Need hosting for a small forum with full cPanel & MySQL access? Contact me or PM me.
-
- Registered User
- Posts: 165
- Joined: Fri Apr 05, 2013 3:38 am
Re: [RFC] WYSIWYG editor
Okay, is WYSIWYG editor included in 3.1? I thought it was..
- EXreaction
- Registered User
- Posts: 1555
- Joined: Sat Sep 10, 2005 2:15 am
Re: [RFC] WYSIWYG editor
3.1 very likely won't include a WYSIWYG editor, but I think it's almost certain that 3.2 will.
Re: [RFC] WYSIWYG editor
I'm totally against WYSIWYG(generally referring to html editors) as I think a forum is more focused on organized discussion using easy to read text. I think we're not trying to be what Google Wave was. We already have a good/mature/secure parser for posts which is the BBCode system. But let's level it up. Let's make use of Markdown for posts so that WYSIWYG is not necessary anymore as Markdown is easy to comprehend. To add extra stuff, let's use BBCode but let's make them represent a directive just like what AngularJS directives are. This way, we are using frontend/client resource in generating the view for that directive.
Re: [RFC] WYSIWYG editor
+1 to markdownmeatsadam wrote:I'm totally against WYSIWYG(generally referring to html editors) as I think a forum is more focused on organized discussion using easy to read text. I think we're not trying to be what Google Wave was. We already have a good/mature/secure parser for posts which is the BBCode system. But let's level it up. Let's make use of Markdown for posts so that WYSIWYG is not necessary anymore as Markdown is easy to comprehend. To add extra stuff, let's use BBCode but let's make them represent a directive just like what AngularJS directives are. This way, we are using frontend/client resource in generating the view for that directive.
Re: [RFC] WYSIWYG editor
-1 to markdown. It doesn't make any sense to me. BBCode has logical structure and is very easy to learn/use, markdown isn't.
What we need is inline rich text editor, using combination of JS and contenteditable attribute. Editor should look like a normal post and content in editor should look exactly like it will look after posting. You can see example of inline editor here: http://ckeditor.com/demo#inline
What we need is inline rich text editor, using combination of JS and contenteditable attribute. Editor should look like a normal post and content in editor should look exactly like it will look after posting. You can see example of inline editor here: http://ckeditor.com/demo#inline
Formerly known as CyberAlien.
Free phpBB styles | Premium responsive XenForo styles | Iconify - modern open source replacement for glyph fonts
Free phpBB styles | Premium responsive XenForo styles | Iconify - modern open source replacement for glyph fonts