Hello to all,
I suggest to add to phpBB a Javascript enabled preview,
Instead of submitting the form to the server, just parse the bbcode with javascript and show the preview without waiting for the page to reload.
This will save both server load and time of the client.
At the same time, check content limitations (minimum length, maximum length, etc...)
[RFC] Javascript Preview
- callumacrae
- Former Team Member
- Posts: 1046
- Joined: Tue Apr 27, 2010 9:37 am
- Location: England
- Contact:
Re: [RFC] Javascript Preview
-1, unless it used AJAX. It would involve implementing an entire BBCode engine client side, which probably wouldn't perform exactly the same.
Re: [RFC] Javascript Preview
+1
I have already been working on one preview parser parsing BBCodes (tribalwars ingame messages) and JavaScript is just enough to parse all available BBCodes. Also custom BBCodes created by user though ACP would not be problematic, I think.
I cannot see any problem with any BBCode. Maybe
I have already been working on one preview parser parsing BBCodes (tribalwars ingame messages) and JavaScript is just enough to parse all available BBCodes. Also custom BBCodes created by user though ACP would not be problematic, I think.
I cannot see any problem with any BBCode. Maybe
Code: Select all
could be quite problematic using parameter (ie. [code=php]) - this would force us to implement also JS-powered syntax highlighter (but there are [url=http://www.webdesignbooth.com/9-useful-javascript-syntax-highlighting-scripts/]tons[/url] of them). However, I cannot see any other BBCode problematic...
Re: [RFC] Javascript Preview
-1. A rich text editor (WYSIWYG editor) is being developed for 3.2 and as such this would be made obsolete.
Formerly known as Unknown Bliss
No unsolicited PMs please except for quotes.psoTFX wrote: I went with Olympus because as I said to the teams ... "It's been one hell of a hill to climb"
Re: [RFC] Javascript Preview
I didn't see progress in the WYSIWYG editor for over 3 months,
this wouldn't take long to develop. It would act exactly the same (without AJAX) if javascript is implemented correctly.
this wouldn't take long to develop. It would act exactly the same (without AJAX) if javascript is implemented correctly.
Re: [RFC] Javascript Preview
This proposal would require reimplementing our bbcode parser in javascript, or am I missing something?
- imkingdavid
- Registered User
- Posts: 1050
- Joined: Thu Jul 30, 2009 12:06 pm
Re: [RFC] Javascript Preview
No, you're right, unless it's done by AJAX which would continually be sending requests to the PHP bbcode parser after each character is typed.Oleg wrote:This proposal would require reimplementing our bbcode parser in javascript, or am I missing something?
IMO, let's stick with the WYSIWYG. Someone is working on that right now.
Re: [RFC] Javascript Preview
1) Its a GSoC Project
2) Someone else from phpBB wants to do it if it isn't done for GSoC
3) https://github.com/phpbb/phpbb3/pull/649
2) Someone else from phpBB wants to do it if it isn't done for GSoC
3) https://github.com/phpbb/phpbb3/pull/649
Formerly known as Unknown Bliss
No unsolicited PMs please except for quotes.psoTFX wrote: I went with Olympus because as I said to the teams ... "It's been one hell of a hill to climb"
Re: [RFC] Javascript Preview
Yes agreed stick with the current preview system phpBB has, with WYSIWYG coming I don't think this is necessary, just bloat.
-Jonah
Re: [RFC] Javascript Preview
I think the first post refers to a normal (one-off) preview, not a "live" preview.imkingdavid wrote:AJAX [...] would continually be sending requests to the PHP bbcode parser after each character is typed.
As for the rest, while I'm not certain it would be a good idea for phpBB to implement a client-side preview, a RTE will not completely replace the preview function as many BBCodes would be too complex/costly (in terms of effort) to implement inside of a RTE.
That also applies to RTEs though. A board's style may usecallumacrae wrote:an entire BBCode engine client side [...] probably wouldn't perform exactly the same.
<span>
tags for bold while browsers may use a <b>
or <strong>
tag inside of their editor and it takes a lot of effort to normalize their markup. Ironically, the only actual WYSIWYG markup is the one you get by clicking "Preview"