[RFC] WYSIWYG editor

Note: We are moving the topics of this forum and it will be deleted at some point

Publish your own request for comments/change or patches for the next version of phpBB. Discuss the contributions and proposals of others. Upcoming releases are 3.2/Rhea and 3.3.
User avatar
emosbat
Registered User
Posts: 43
Joined: Fri Aug 24, 2012 8:49 am

Re: [RFC] WYSIWYG editor

Post by emosbat »


sdaugherty
Registered User
Posts: 2
Joined: Sat Apr 06, 2013 7:34 am

Re: [RFC] WYSIWYG editor

Post by sdaugherty »

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

User avatar
EXreaction
Registered User
Posts: 1555
Joined: Sat Sep 10, 2005 2:15 am

Re: [RFC] WYSIWYG editor

Post by EXreaction »

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

User avatar
Pony99CA
Registered User
Posts: 986
Joined: Sun Feb 08, 2009 2:35 am
Location: Hollister, CA
Contact:

Re: [RFC] WYSIWYG editor

Post by Pony99CA »

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
Meis2M
Registered User
Posts: 436
Joined: Fri Apr 23, 2010 10:18 am
Contact:

Re: [RFC] WYSIWYG editor

Post by Meis2M »

tinymce4 is released.

Alien_Time
Registered User
Posts: 165
Joined: Fri Apr 05, 2013 3:38 am

Re: [RFC] WYSIWYG editor

Post by Alien_Time »

Okay, is WYSIWYG editor included in 3.1? I thought it was..

User avatar
EXreaction
Registered User
Posts: 1555
Joined: Sat Sep 10, 2005 2:15 am

Re: [RFC] WYSIWYG editor

Post by EXreaction »

3.1 very likely won't include a WYSIWYG editor, but I think it's almost certain that 3.2 will.

meatsadam
Registered User
Posts: 4
Joined: Mon May 13, 2013 5:33 am

Re: [RFC] WYSIWYG editor

Post by meatsadam »

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.

User avatar
hanakin
Front-End Dev Team Lead
Front-End Dev Team Lead
Posts: 935
Joined: Sat Dec 25, 2010 9:02 pm
Contact:

Re: [RFC] WYSIWYG editor

Post by hanakin »

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
Donations welcome via Paypal Image

User avatar
Arty
Former Team Member
Posts: 985
Joined: Wed Mar 06, 2002 2:36 pm
Location: Mars
Contact:

Re: [RFC] WYSIWYG editor

Post by Arty »

-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

Post Reply