phpBB

Development Discussion Board

phpBB's testing ground of bleeding edge code
Advanced search

WYSIWYG editor

General discussion of development ideas and the approaches taken in the 3.x branch of phpBB. The next feature release of phpBB 3 will be 3.1/Ascreaus followed by 3.2/Arsia.

Re: WYSIWYG editor

Postby naim » Fri Oct 14, 2011 5:50 am

it is entirely client-side, all we have to do is implement it to the template. (and of-course make sure that all tags are allowed...)
User avatar
naim
Registered User
 
Posts: 46
Joined: Thu Oct 13, 2011 7:21 pm
Location: Isolation

Re: WYSIWYG editor

Postby leviatan21 » Fri Oct 14, 2011 2:56 pm

naim wrote:http://wysiwygbbcode.codeplex.com/ it is lightweight and is perfect for phpBB.

may be it looks fine, but have a lot of faults, the main problem is that is not phpbb integrated :
1) Doesn't take into account permissions or if some of the bbcodes are not allowed
2) Doesn't take into account custom bbcodes
QA Team Member - I don't support by PM,
Customize forums, install Skins/Mods ! Sendme a PM | Don't forget to visit my other mods
Excuse me for my poor English, I speak Spanish. | Image phpBB en Español
leviatan21
Registered User
 
Posts: 18
Joined: Tue May 05, 2009 5:51 pm

Re: WYSIWYG editor

Postby nextgen » Sat Oct 15, 2011 6:38 am

callumacrae wrote:
nextgen wrote:The editor looks good but the question is whether security is not at risk.

How could it be a security risk? It's almost entirely client side.

publishers include such functions to put iframes, it does not want vurnerable the system.

the ckeditor I see is the same as used in vB4
phpBB®: Become a Junior Styles Validator
I prefer to ask and not stay with the doubt...
User avatar
nextgen
Registered User
 
Posts: 90
Joined: Sat Jul 24, 2010 4:59 am
Location: Guatemala

Re: WYSIWYG editor

Postby naim » Sat Oct 15, 2011 4:50 pm

leviatan21 wrote:
naim wrote:http://wysiwygbbcode.codeplex.com/ it is lightweight and is perfect for phpBB.

may be it looks fine, but have a lot of faults, the main problem is that is not phpbb integrated :
1) Doesn't take into account permissions or if some of the bbcodes are not allowed
2) Doesn't take into account custom bbcodes


About the editor, the "YouTube" button should be removed... - it is useless...
The Quote button does have a little fault, but except that is works fine, it has Bold, Italic, Underline, Color selection, just like phpbb.
Since the source is small, i'm sure if decided to use this editor, someone will be happy to edit it.

1. If you looked through the source "sample.html", you will see that all you have to-do is put the buttons in <!-- IF... Wrappers.
2. you are right about custom BBCodes, but the script file of this editor is very small and you can easily insert custom codes.
User avatar
naim
Registered User
 
Posts: 46
Joined: Thu Oct 13, 2011 7:21 pm
Location: Isolation

Re: WYSIWYG editor

Postby leviatan21 » Sat Oct 15, 2011 5:09 pm

naim wrote:Since the source is small, i'm sure if decided to use this editor, someone will be happy to edit it.
1. If you looked through the source "sample.html", you will see that all you have to-do is put the buttons in <!-- IF... Wrappers.
2. you are right about custom BBCodes, but the script file of this editor is very small and you can easily insert custom codes.

You are welcome to do it and then share your result with all of us.
Hope to see your topic at phpbb.com :roll:
QA Team Member - I don't support by PM,
Customize forums, install Skins/Mods ! Sendme a PM | Don't forget to visit my other mods
Excuse me for my poor English, I speak Spanish. | Image phpBB en Español
leviatan21
Registered User
 
Posts: 18
Joined: Tue May 05, 2009 5:51 pm

Re: WYSIWYG editor

Postby naim » Mon Oct 17, 2011 8:58 am

Well, i looked at the CKEditor, and it is much better then what i suggested and it has a bbcode plugin!
There is a problem with smilies, permissions was not a problem, i am currently working on custom commands.
Note: Before testing the attached files on your forum, please back up "prosilver" template.
The CKEditor folder has been included in the archive, if you want you can download CKEditor from http://ckeditor.com/

Attachment compressed in 7z format (http://sevenzip.sourceforge.net/)
Attachments
ckephpbb.7z
Snapshot-1
(988.31 KiB) Downloaded 195 times
User avatar
naim
Registered User
 
Posts: 46
Joined: Thu Oct 13, 2011 7:21 pm
Location: Isolation

Re: WYSIWYG editor

Postby wGEric » Mon Oct 17, 2011 7:17 pm

Both of us apparently had very similar ideas:

https://github.com/wGEric/phpbb3/commit ... 7779e3c172

I think you have the right idea of putting the CKEditor config in posting_editor.html. I was trying to think of a good way to pass in config options, custom bbcodes and similes. I was thinking of creating a javascript phpbb config variable that would hold things like that.

I want to figure out a way to have CSS in the styles folder so that style authors can customize the look of CKEditor. Then for translations CKEditor has its own language files. It would probably be ok to use those instead of the phpBB language files.
Eric
wGEric
Registered User
 
Posts: 506
Joined: Wed Jun 11, 2003 2:07 am

Re: WYSIWYG editor

Postby naim » Mon Oct 17, 2011 7:35 pm

wGEric wrote:Both of us apparently had very similar ideas:

https://github.com/wGEric/phpbb3/commit ... 7779e3c172

I think you have the right idea of putting the CKEditor config in posting_editor.html. I was trying to think of a good way to pass in config options, custom bbcodes and similes. I was thinking of creating a javascript phpbb config variable that would hold things like that.

I want to figure out a way to have CSS in the styles folder so that style authors can customize the look of CKEditor. Then for translations CKEditor has its own language files. It would probably be ok to use those instead of the phpBB language files.


We should probably omit all languages files and include them only with translations (not like the snapshot i uploaded or whats in your github).
phpBB's template engine won't compile .js files, so you must write the configuration in "posting_editor.html".

About Styles: http://docs.cksource.com/ckeditor_api/symbols/CKEDITOR.stylesSet.html (Probably need to make a custom style panel, or create a Styler's panel for phpBB).
User avatar
naim
Registered User
 
Posts: 46
Joined: Thu Oct 13, 2011 7:21 pm
Location: Isolation

Re: WYSIWYG editor

Postby Igor Isaias Banlian » Fri Oct 21, 2011 6:45 pm

naim wrote:Well, i looked at the CKEditor, and it is much better then what i suggested and it has a bbcode plugin!
There is a problem with smilies, permissions was not a problem, i am currently working on custom commands.
Note: Before testing the attached files on your forum, please back up "prosilver" template.
The CKEditor folder has been included in the archive, if you want you can download CKEditor from http://ckeditor.com/

Attachment compressed in 7z format (http://sevenzip.sourceforge.net/)

Please, we all need a CKEditor MOD for phpBB that works correctly, then continue your good work on developing it!

Here I had problems with:

1) The smilies are not working properly;
2) The Flash button does not work correctly.

I wish he had a few more buttons:

1) A button to the tags [ code ] [ / code ];
2) A button to attach YouTube videos to posts.

I would also like it could be used in the Quick Reply box and theme subsilver2 too...

Note: The Almsamim WYSIWYG editor has a button to attach YouTube videos to the posts, but due to changes in the YouTube API, function does not work anymore...

Sorry for my bad English, I am Brazilian!

Regards,
Igor Isaias Banlian
User avatar
Igor Isaias Banlian
Registered User
 
Posts: 1
Joined: Fri Oct 21, 2011 4:38 pm
Location: Brazil / São Paulo / SP

Re: WYSIWYG editor

Postby wiktor » Wed Nov 30, 2011 10:46 am

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.

When taking the default package of the CKEditor and the mentioned WYSIWYG BBCode Editor, you are comparing actually two totally different applications:
- a pretty basic editor that is rarely maintained, which in fact simply inserts a contenteditable element inside of an iframe and... that's all.
- and the editor that has hundreds of additional things inside of it, e.g to be more accessible, that supports RTL languages, with some decent keyboard navigation and really, with hundreds of tweaks to deal with various browsers issues with contenteditable elements reported by users.

I could list much more features of CKEditor, but even this small set of things explains why it does not make sense to include a very basic editor in an application that is used by milions of users around the world.

At the end, let me just add that the bbcode plugin that is available in CKEditor is just a sample, to show that CKEditor is capable of producing different syntax than HTML. The list of supported tags can be further extended.
wiktor
Registered User
 
Posts: 6
Joined: Tue May 24, 2011 12:05 pm

Previous Next

Return to [3.x] Discussion

Who is online

Users browsing this forum: No registered users and 10 guests