PHPBB3-10418 - WYSIWYG Editor/Rich Text Editor

Discuss requests for comments/changes posted in the Issue Tracker for the development of phpBB. Current releases are 3.2/Rhea and 3.3/Proteus.
Post Reply
User avatar
Meis2M
Registered User
Posts: 448
Joined: Fri Apr 23, 2010 10:18 am
Contact:

Re: [RFC] WYSIWYG Editor/Rich Text Editor

Post by Meis2M »

i working on tinymce about 1 years, and Custom BBCodes working perfect in this editor.
Custom BBCode in my working has to options dropdown menu & buttons.

my editor is working perfect on prosilver and subsilver2 and phpBB 3.1.dev.

http://www.php-bb.ir/test/posting.php?mode=post&f=2

u can try it:
test
123456

User avatar
Meis2M
Registered User
Posts: 448
Joined: Fri Apr 23, 2010 10:18 am
Contact:

Re: [RFC] WYSIWYG Editor/Rich Text Editor

Post by Meis2M »

some one with this ip 190.115.8.3 put porno images in my test forum.
i will ban him for next time.

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

Re: [RFC] WYSIWYG Editor/Rich Text Editor

Post by EXreaction »

When working with a WYSIWYG editor and using custom bbcodes, they should be formatted automatically and displayed like they would be in a preview. We don't just want the ability to insert custom bbcodes from a button.

User avatar
Meis2M
Registered User
Posts: 448
Joined: Fri Apr 23, 2010 10:18 am
Contact:

Re: [RFC] WYSIWYG Editor/Rich Text Editor

Post by Meis2M »

EXreaction wrote:they should be formatted automatically and displayed like they would be in a preview
i cant say it is not possible but it is very difficult to do this. because some custom bbcodes need css so we must write a program element for this.
but the default bbcode of phpBB is formatted automatically.

vbulletin use ckeditor and custom bbcodes of it is like my working and its not formatted automatically and displayed like they.

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

Re: [RFC] WYSIWYG Editor/Rich Text Editor

Post by EXreaction »

From what I've seen with CKEditor, it's definitely possible to do something like custom bbcodes and have them rendered. The problem is that, at least in their examples, it uses a structure to design the HTML elements instead of just accepting a block of HTML code. I've found a simple example for adding your own replacements:
http://blog.lystor.org.ua/2010/11/ckedi ... n-for.html

I've opened up a topic in their support forum asking if their system would be capable of handling direct HTML input and replacement, I'll see what I get for replies.

User avatar
Meis2M
Registered User
Posts: 448
Joined: Fri Apr 23, 2010 10:18 am
Contact:

Re: [RFC] WYSIWYG Editor/Rich Text Editor

Post by Meis2M »

i dont know when we have a Audio , Video or image effect bbcode how render from it?

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

Re: [RFC] WYSIWYG Editor/Rich Text Editor

Post by EXreaction »

They can be transformed like any other HTML, I know there are WYSIWYG Editors that support it and display them inline.

Actually, I did a little searching for a WYSIWYG Editor that supports BBCode and is based on jQuery and I found something new:
http://www.sceditor.com/posts/bbcode-demo/

There is an example on http://www.sceditor.com/documentation/ of how to add custom bbcodes, though I've not yet figured out how to be able to add buttons to get custom bbcode fully working.

I've made a few branches of 3.1 with different WYSIWYG Editors installed (of course, non of them are fully working, this is just to help test them):

https://github.com/EXreaction/phpbb3/tr ... re/TinyMCE
https://github.com/EXreaction/phpbb3/tr ... e/CKEditor
https://github.com/EXreaction/phpbb3/tr ... e/SCEditor

wGEric
Registered User
Posts: 521
Joined: Wed Jun 11, 2003 2:07 am
Contact:

Re: [RFC] WYSIWYG Editor/Rich Text Editor

Post by wGEric »

EXreaction wrote:From what I've seen with CKEditor, it's definitely possible to do something like custom bbcodes and have them rendered. The problem is that, at least in their examples, it uses a structure to design the HTML elements instead of just accepting a block of HTML code. I've found a simple example for adding your own replacements:
http://blog.lystor.org.ua/2010/11/ckedi ... n-for.html

I've opened up a topic in their support forum asking if their system would be capable of handling direct HTML input and replacement, I'll see what I get for replies.
You can write your own data parser to do that. Here is an example. The out of the box BBCode plugin does not do what you want it to do.
They can be transformed like any other HTML, I know there are WYSIWYG Editors that support it and display them inline.
Bad idea for some types of media. Videos especially since they usually have controls in their players that would make it hard to select the video in the editor to make changes to it.
Eric

User avatar
brunoais
Registered User
Posts: 964
Joined: Fri Dec 18, 2009 3:55 pm

Re: [RFC] WYSIWYG Editor/Rich Text Editor

Post by brunoais »

Help me checking if my algorithms are right.
Please show me where can I get BBCodes that are harder to translate from HTML to BBCode.
One good example is the spoiler BBCode.
Ya know... Spoiler BBcode? Eh :|... The one where you hide stuff and you have a button that when you press it makes the spoiler text to appear? Like this one?

Code: Select all

<div style="margin:20px; margin-top:5px"><div class="quotetitle"><input class="button2 btnlite" type="button" value="Show" style="text-align:center;width:100px;margin:0px;padding:0px;" onclick="if (this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display != '') { this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display = '';      this.innerText = ''; this.value = 'Hide'; } else { this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display = 'none'; this.innerText = ''; this.value = 'Show'; }" /></div><div class="quotecontent"><div style="display: none;">{TEXT}</div></div></div>
Yeah! That one! :D

I already tested this specific BBCode and two variants of this and they successfully worked. Now I need completely different stuff to test and check if works. As you know, it needs to be general enough to work with the most possible BBCodes that can ever exist.

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

Re: [RFC] WYSIWYG Editor/Rich Text Editor

Post by EXreaction »


Post Reply