phpBB

Development Discussion Board

phpBB's testing ground of bleeding edge code
Advanced search

[RFC] WYSIWYG editor

Publish your own request for comments or patches for phpBB4. Discuss the contributions and proposals of others.
Forum rules
Information on how to create an RFC and a list of current RFCs can be found at http://wiki.phpbb.com/PhpBB4/RFC

Re: [RFC] WYSIWYG editor

Postby emosbat » Fri Aug 24, 2012 10:12 am

User avatar
emosbat
Registered User
 
Posts: 36
Joined: Fri Aug 24, 2012 8:49 am

Re: [RFC] WYSIWYG editor

Postby sdaugherty » Sat Apr 06, 2013 9:01 am

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....
sdaugherty
Registered User
 
Posts: 2
Joined: Sat Apr 06, 2013 7:34 am

Re: [RFC] WYSIWYG editor

Postby EXreaction » Thu Apr 11, 2013 6:24 pm

Using a HTML whitelist is essentially the same thing as bbcode, just using <> tags rather than [].
My phpBB3 Mods: Advertisement Management | User Blog Mod | Anti-Spam ACP | Advanced Subscriptions | One Click Ban | From Author PM List | FAQ Manager | Forum Sponsors | Soft Delete | Auto Database Backup | Drag 'n Drop Forum List | HTML Ranks | Enable HTML
User avatar
EXreaction
Development Team
Development Team
 
Posts: 1259
Joined: Sat Sep 10, 2005 2:15 am

Re: [RFC] WYSIWYG editor

Postby Pony99CA » Thu Apr 11, 2013 10:24 pm

EXreaction wrote:Using a HTML whitelist is essentially the same thing as bbcode, just using <> tags rather than [].

Not really.

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.
User avatar
Pony99CA
Registered User
 
Posts: 467
Joined: Sun Feb 08, 2009 2:35 am
Location: Hollister, CA

Re: [RFC] WYSIWYG editor

Postby Meis2M » Fri Apr 12, 2013 2:38 pm

tinymce4 is released.
User avatar
Meis2M
Registered User
 
Posts: 213
Joined: Fri Apr 23, 2010 10:18 am

Re: [RFC] WYSIWYG editor

Postby Alien_Time » Sat Apr 13, 2013 4:23 am

Okay, is WYSIWYG editor included in 3.1? I thought it was..
Alien_Time
Registered User
 
Posts: 8
Joined: Fri Apr 05, 2013 3:38 am

Re: [RFC] WYSIWYG editor

Postby EXreaction » Sat Apr 13, 2013 6:33 pm

3.1 very likely won't include a WYSIWYG editor, but I think it's almost certain that 3.2 will.
My phpBB3 Mods: Advertisement Management | User Blog Mod | Anti-Spam ACP | Advanced Subscriptions | One Click Ban | From Author PM List | FAQ Manager | Forum Sponsors | Soft Delete | Auto Database Backup | Drag 'n Drop Forum List | HTML Ranks | Enable HTML
User avatar
EXreaction
Development Team
Development Team
 
Posts: 1259
Joined: Sat Sep 10, 2005 2:15 am

Re: [RFC] WYSIWYG editor

Postby meatsadam » Mon May 13, 2013 6:12 am

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.
meatsadam
Registered User
 
Posts: 4
Joined: Mon May 13, 2013 5:33 am

Re: [RFC] WYSIWYG editor

Postby hanakin » Mon May 13, 2013 10:15 pm

meatsadam 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.


+1 to markdown
hanakin
Registered User
 
Posts: 173
Joined: Sat Dec 25, 2010 9:02 pm

Re: [RFC] WYSIWYG editor

Postby Arty » Tue May 14, 2013 5:34 am

-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
Formerly known as CyberAlien.
User avatar
Arty
Styles Team
Styles Team
 
Posts: 796
Joined: Wed Mar 06, 2002 2:36 pm
Location: Mars

Previous Next

Return to [4.x] RFCs

Who is online

Users browsing this forum: No registered users and 5 guests