phpBB

Development Discussion Board

phpBB's testing ground of bleeding edge code
Advanced search

WYSIWYG Editor/Rich Text Editor

Publish your own request for comments or patches for the next version of phpBB. Discuss the contributions and proposals of others. Upcoming releases are 3.1/Ascraeus and 3.2/Arsia.

Re: [RFC] WYSIWYG Editor/Rich Text Editor

Postby jsebean » Wed Apr 11, 2012 11:39 am

wiktor wrote:... e.g. when it comes to text selection, placing the caret etc. that it really does not make sense to "enable" CKEditor on them.

That would be alright with me.
-Jonah
Formerly known as jsbean.
User avatar
jsebean
Registered User
 
Posts: 136
Joined: Wed Nov 17, 2010 1:40 am
Location: Atlantic Canada

Re: [RFC] WYSIWYG Editor/Rich Text Editor

Postby AliasM2K » Sun Apr 15, 2012 1:32 am

Finished a simple plugin to insert links, suitable for bbCodes. Attaching screen shots of the current status.

Yet to do:
  1. Disable the default Edit Link and Unlink options in context menu
  2. Workout a Remove Link toolbar and context menu button
  3. Set selected text as link to text in the insert link dialog


Live demo coming soon when the above objectives are completed :D
Attachments
bblink-con.jpg
bbLink Context Menu
bblink.jpg
bbUrl Plugin
User avatar
AliasM2K
Registered User
 
Posts: 82
Joined: Tue Mar 27, 2012 2:33 am

Re: [RFC] WYSIWYG Editor

Postby shibulijack » Sun Apr 15, 2012 10:27 am

wiktor wrote:Just wanted to propose something, not sure how similar it is to the results of the conversation in IRC.

Default state:

phpbb_ckeditor_off.png

After clicking on the "Enable rich-text editor" link:

phpbb_ckeditor_on.png


Some thoughts (just my personal opinion):

  • the initial integration may have some bugs, thus the default state is disabled, the only change in the interface is a gentle link below the textarea
  • some people don't like to be forced to use something new, so another vote for disabling by default
  • once users get used to the editor and will not report any major issues, the default mode can be changed
  • CKEditor needs a cool plugin to edit and insert source code ([code]) (in progress)
  • The "Source" mode in CKEditor and removing CKEditor from a textarea (calling editor.destroy()) are two different things. Being in "Source" mode means that we are still in CKEditor. In case of a bug with processing BBCodes a safer option would be to have this opportunity to "destroy" CKEditor instance and get back to plain textarea (CKEditor can be enabled later - basically destroying would work like in the ajax sample).

The ugly link below editor/textarea can be of course changed into e.g. more fancy tabs.


I have been working with the CKEditor for a while.
http://shibulijack.wordpress.com/2012/03/26/phpbb-visual-editor/:
Image
Also, there is an option in UCP to enable/disable this feature.
I would love to hear your suggestions.

To-do list:
    Tweak CSS to match prosilver and subsilver(if needed)
    Learn about git submodules and try to integrate CKEditor as an asset.
    Set up an option in ACP.
    Fix the phpBB smileys integration issue.
    Fix issues such as JS turned off.

The biggest obstacle to my project, as Oleg pointed out, is the custom BBCodes. For style related custom BBCodes, it is not that difficult to integrate it with the RTE, although there will be an issue of the button image to be used for that particular custom code. Also, for complex custom BBCodes like YouTube, a placeholder image needs to be placed in the editor. If someone has already been working on the custom BBCodes, it could save me hours of coding(and googling!)
shibulijack
Registered User
 
Posts: 15
Joined: Mon Mar 19, 2012 8:22 pm

Re: [RFC] WYSIWYG Editor/Rich Text Editor

Postby jsebean » Sun Apr 15, 2012 1:06 pm

Looks nice, so there is two of you working on the editor, I have trouble keeping track. This is for GSoC? I like the CKEditor the best personally, and since they CKEditor people are activly making suggestions and have make it work nicely in BBCode that's even better.
-Jonah
Formerly known as jsbean.
User avatar
jsebean
Registered User
 
Posts: 136
Joined: Wed Nov 17, 2010 1:40 am
Location: Atlantic Canada

Re: [RFC] WYSIWYG Editor/Rich Text Editor

Postby shibulijack » Sun Apr 15, 2012 7:49 pm

jsebean wrote:Looks nice, so there is two of you working on the editor, I have trouble keeping track. This is for GSoC? I like the CKEditor the best personally, and since they CKEditor people are activly making suggestions and have make it work nicely in BBCode that's even better.

Yes, I prefer CKEditor, although it's a little heavy in resources. Not to mention the BBCode JS plugin, which is a life saver. However, a lot of work needs to be done. Hopefully, it will be ready by the end of this summer :)
shibulijack
Registered User
 
Posts: 15
Joined: Mon Mar 19, 2012 8:22 pm

Re: [RFC] WYSIWYG Editor/Rich Text Editor

Postby AliasM2K » Mon Apr 16, 2012 1:29 am

Done improvising! Live preview now available!

Infact, there was no need for any custom plugins... Just a couple of minor tweaks in the dialog box was enough to do the magic :D
Feed backs please :D
User avatar
AliasM2K
Registered User
 
Posts: 82
Joined: Tue Mar 27, 2012 2:33 am

Re: [RFC] WYSIWYG Editor/Rich Text Editor

Postby brunoais » Mon Apr 16, 2012 9:29 am

Got an exception:
Error: C is undefined
Source file: http://aliasm2k.github.com/rte-ckeditor ... keditor.js
Line: 54

This happened while I was trying to view the source code and there was no text, just 2 smilies.

Without the bugs like the missing translation from the strike though to the final BBCode it looks nice.
brunoais
Registered User
 
Posts: 626
Joined: Fri Dec 18, 2009 3:55 pm

Re: [RFC] WYSIWYG Editor/Rich Text Editor

Postby imkingdavid » Mon Apr 16, 2012 1:28 pm

Strike and size bbcodes are removed if you switch to source and then back. Also, eventually, it should be using the phpBB smilies and will need to handle custom BBcodes somehow.
I do custom MODs. PM for a quote!
View My: MODs | Portfolio
Please do NOT contact for support via PM or email.
Remember, the enemy's gate is down.
User avatar
imkingdavid
Development Team
Development Team
 
Posts: 900
Joined: Thu Jul 30, 2009 12:06 pm

Re: [RFC] WYSIWYG Editor/Rich Text Editor

Postby shibulijack » Mon Apr 16, 2012 1:47 pm

imkingdavid wrote:Strike and size bbcodes are removed if you switch to source and then back.

There is no such problem in the patch which I have submitted.
shibulijack
Registered User
 
Posts: 15
Joined: Mon Mar 19, 2012 8:22 pm

Re: [RFC] WYSIWYG Editor/Rich Text Editor

Postby AliasM2K » Tue Apr 17, 2012 12:18 am

imkingdavid wrote:Strike and size bbcodes are removed if you switch to source and then back. Also, eventually, it should be using the phpBB smilies and will need to handle custom BBcodes somehow.


About the strike and size bbcode bugs; that occurs because I still use the default bbcode plugin provided by CKEditor. The bug exists only for the bbcode plugin, and works fine for HTML outputs. So, here the idea, output as HTML and use JS to parse HTML to bbcode before feeding it to phpBB bbcode parser.

About using phpBB smileys, it will be done soon; and handling of custom bbcodes, that is a topic which requires quite a discussion. Will come back to it later.

Right now could someone give some ideas on the working of phpBB bbcode praser?
User avatar
AliasM2K
Registered User
 
Posts: 82
Joined: Tue Mar 27, 2012 2:33 am

Previous Next

Return to [3.x] RFCs

Who is online

Users browsing this forum: No registered users and 12 guests