WYSIWYG editor

General discussion of development ideas and the approaches taken in the 3.x branch of phpBB. The current feature release of phpBB 3 is 3.3/Proteus.
Forum rules
Please do not post support questions regarding installing, updating, or upgrading phpBB 3.3.x. If you need support for phpBB 3.3.x please visit the 3.3.x Support Forum on phpbb.com.

If you have questions regarding writing extensions please post in Extension Writers Discussion to receive proper guidance from our staff and community.
Post Reply
User avatar
naim
Registered User
Posts: 50
Joined: Thu Oct 13, 2011 7:21 pm
Location: Isolation
Contact:

Re: WYSIWYG editor

Post by naim »

wiktor wrote:
naim wrote:
The WYSIWYG editor that convinced me the most so far was CKEditor. There have been discussions about integration a while ago. From what I can tell CKEditor is pluggable.
i think CKEditor is a bit heavy for phpBB.
(...)
Hi, I'm from the CKEditor team and just wanted to add 0.02$ and say that I do not agree with your opinion :)

Please do not judge CKEditor just by looking at the size of the downloaded package etc.
This pretty old blog post explains some details regarding loading performance.

The size of CKEditor can be easily reduced by removing the plugins that are not needed (e.g all the "form" buttons), removing _source/_samples folders etc.
After you decide which plugins and buttons do you really need, you may recreate the package and end up with a much smaller and even faster editor.
It cannot be reduced to 20KB, ok, but just because it is an application that has much more features.
If you would go to my previous post, you will see that i used the CKEditor - CKEditor is better.
And yes, your team's (CKEditor Team) Editor is very impresive.
- I have seen all of the plugins, BBCode is the main plugin that would be used with phpBB (unless they change it...).
User avatar
callumacrae
Former Team Member
Posts: 1046
Joined: Tue Apr 27, 2010 9:37 am
Location: England
Contact:

Re: WYSIWYG editor

Post by callumacrae »

Meis2M wrote:Hi
new editor for phpBB
https://www.phpbb.com/community/viewtop ... #p13175881
Doesn't work on my iPhone, at all.
Made by developers, for developers!
My blog
User avatar
EXreaction
Registered User
Posts: 1555
Joined: Sat Sep 10, 2005 2:15 am

Re: WYSIWYG editor

Post by EXreaction »

After testing TinyMCE, CKEditor and SCEditor the team (brunoais and EXreaction) have decided to keep SCEditor.
The rationale behind it is that:
TinyMCE -> The BBCode plugin is too buggy, incomplete and the code is not easy to read, the text editing mode disables all BBCode buttons.
CKEditor -> The BBCode plugin is too buggy and incomplete. It would take a fair amount of work to fix it, the text editing mode disables all BBCode buttons.
SCEditor -> The BBCode plugin is mostly complete, works quite well, I only know about 1 bug so far which is probably easy to solve, allows us to add Custom BBCode easily, the text editing mode allows to keep all BBCode buttons enabled.

--------------------------------------------------------------------------------------------------------------------------------------------------------------------

  1. In WYSIWYG mode, using some kinds of BBCodes (like inline youtube videos), would make editing more difficult.
    To get around this, we've decided that the best option would be to allow administrators a few additional options in the ACP.
    • First new option: Checkbox, display BBCode Inline in WYSIWYG (no means just the raw BBCode is shown)
    • Second new option: Checkbox, use custom display method for WYSIWYG mode (no means the normal HTML replacement is used)
    • Third new option: Textarea, Custom display method output (HTML replacement for the BBCode in WYSIWYG mode, only if custom display method is checked)
    This should resolve most issues that users could have with certain custom bbcodes, but it may require more work by the administrator to edit the display to make them usable (or they will just have to disable the inline display). The downside here is that these are some additional, potentially confusing, options administrators will have to use when creating BBCodes.
  2. Another issue related to the one above is that, by just letting some BBCodes be displayed inline, users will run into issues sometimes where the contents within the bbcode are not editable because the text is not displayed within the replacement (for example, a youtube video). There should be some way for the user to edit these more easily, perhaps with some sort of popup box via either a right-click option or some sort of overlay with an edit button. This behavior needs to be decided so that it works for any bbcode either natively or with some administrative configuration.
  3. For bbcodes with multiple replacements, there are two significant issues that makes editing them in WYSIWYG mode difficult:
    • [abc]uio,huh,ui[/abc] -> <span title="ui"><b class="huh">uio</b></span>
      When displayed in WYSIWYG mode, in this example, only the first item, uio, would be visible (of course this is only a single example and in real use many significantly different uses could be in use).
      So the question is, how would the user be able to edit the stuff in this bbcode without going back to source mode?
    • [abc]test[/abc] -> <span title="test">test</span>
      This is an example where the user might have a single input and have multiple areas that the text is shown in the replacement.
      When in WYSIWYG mode, these items would need to be syncronized somehow for accurate display, and the question here is, how could that be done?
  4. Browsers already natively support text transformation for some basic replacements (bold, italic, etc).
    We can either use these native text transformations or ignore this ability and transform the text as other bbcodes will be.
  5. Since buttons are used in the editor to input custom bbcodes, there are two options to generating them.
    • Allow the administrator to upload an image for the button (the administrator should be able to use different button images for each style they have as well)
    • We generate them automatically by applying some text over a "button" that is really just a background image. How we decide what text to use here is another question (maybe a new option is needed in the admin cp to specify the text?)
User avatar
RMcGirr83
Registered User
Posts: 360
Joined: Fri Mar 09, 2007 1:51 am
Contact:

Re: WYSIWYG editor

Post by RMcGirr83 »

Will there be an option for a user to decide to use either WYSIWYG or normal way?
Do not hire Christian Bullock he won't finish the job and will keep your money
User avatar
imkingdavid
Registered User
Posts: 1050
Joined: Thu Jul 30, 2009 12:06 pm

Re: WYSIWYG editor

Post by imkingdavid »

RMcGirr83 wrote:Will there be an option for a user to decide to use either WYSIWYG or normal way?
There is a button that will let you switch between source editing (the "normal way") or rich editing (WYSIWYG) and I assume that will be paired with a setting in the UCP to control the default view.
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
EXreaction
Registered User
Posts: 1555
Joined: Sat Sep 10, 2005 2:15 am

Re: WYSIWYG editor

Post by EXreaction »

We can easily add the option in the UCP so the user can select the default behavior. While using the WYSIWYG editor, there is also the source button that lets you edit it as you would now.
User avatar
RMcGirr83
Registered User
Posts: 360
Joined: Fri Mar 09, 2007 1:51 am
Contact:

Re: WYSIWYG editor

Post by RMcGirr83 »

Adding the option in the UCP, and if selected that is what one sees while also allowing the user to change the view, sounds like a more complete solution to me?
Do not hire Christian Bullock he won't finish the job and will keep your money
User avatar
imkingdavid
Registered User
Posts: 1050
Joined: Thu Jul 30, 2009 12:06 pm

Re: WYSIWYG editor

Post by imkingdavid »

RMcGirr83 wrote:Adding the option in the UCP, and if selected that is what one sees while also allowing the user to change the view, sounds like a more complete solution to me?
Is that not what we just said is probably going to be implemented, or am I misunderstanding you?
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
RMcGirr83
Registered User
Posts: 360
Joined: Fri Mar 09, 2007 1:51 am
Contact:

Re: WYSIWYG editor

Post by RMcGirr83 »

I was speaking of allowing to "change it on the fly", if you get what I mean. EG, user can choose to always have or not via a setting in the UCP and also can choose to use it or not when making a post.
Do not hire Christian Bullock he won't finish the job and will keep your money
Post Reply