News:

SMF 2.1.4 has been released! Take it for a spin! Read more.

Main Menu

Question about WYSIWYG Editor

Started by hkreuzer, March 18, 2008, 06:29:58 AM

Previous topic - Next topic

hkreuzer

Hello!

First of all, thank you very much for that nice Forum! I'm running it for 2 years now without any problems.

Yesterday I tried the beta of version 2.0, especially the WYSIWYG Editor, because that was my most missed feature. My question is, is that Editor a "work in progress", because some features are already wysiwyg, but some are still bbc code (like tables). So it is possible to format that bbc code and that will not work then. Of course i know that is silly, but I'm sure the users in my Forum will do that ;)
What was the reason not to use any of the many free WYSIWYG Editors that are available?

Greetings from Vienna,

Harald

karlbenson

I doubt all the bbcodes will be WYSIWYG editable. Like quote.

As for free editors.  Why insert unknown security vulnerabilities into your own forum.  For example the widely used TinyMCE editor had a recent vulnerability.

Grudge

The thing you have to remember about forums is that they use BBC and not HTML. As such everything that you can see in a WYSIWYG editor has to be converted back into BBC before it is stored. For things like "bold" that is easy, you simply convert the <b> tag into the [b] tag. However, this gets much harder with more complex tags like quote which produce HTML which is several divs worth of content which the user could edit in their browser.

Quotes and code are actually particularly good examples of where it's not possible to do them in WYSIWYG. For one browsers will very rarely render it properly if you try to insert divs into a content editable like that (I did try implementing it!). Even if I could get them in, as hinted in the paragraph above, the user only needs to delete half of the quote HTML (for example the inner div) and then it won't look like a quote anymore, they won't be able to get it to look like a quote, SMF won't recognise it as a quote, and generally it will confuse the user more rather than less. I suppose what I mean is that on balance it's actually *more* intuitive for a user to show quotes and code as BBC tags than to try make them look nice and have them mess up the HTML.

The table tag is the only tag where I think we probably *could* get it to look right in WYSIWYG mode but currently don't. This is more one of time than anything else. In fact the code exists to turn the HTML into BBC (So if you copy and paste a table from a website into the editor it should work), but to actually implement the "add table" function in WYSWIYG I'd need to add a popup asking how many columns and rows they wanted, and then find a way to add new rows and columns. It's all possible but was low priority.

As for using existing editors; as I eluded to above the problem with existing editors is that they are designed for HTML – and work great for that. They do look great but they just aren't suitable for a BBC/HTML environment IMHO. In addition most editors that are actually any good have huge amounts of code behind them making for a sluggish load time. Finally, any "free" editors tend to be using a different license than SMF that would forbid us from distributing them anyway. For what it's worth I took a look at the WYSIWYG editors that other forums have implemented and they all tend to do roughly what SMF does in terms of requiring "complex" elements to still use BBC as opposed to rendering them as HTML.

Obviously we intend to continue to improve the WYSIWYG editor as much as possible. However, I think it's a huge advancement over the plain text editor, and actually, in the majority of instances, people making a post don't use formatting any more complex than bold/italic/lists and colours.

Thanks for the feedback,

Grudge
[/b][/nobbc]
I'm only a half geek really...

Dudelsack

Hi,
Is it possible to include keyboard shortcuts?
like ctrl+b => bold
ctrl+i => italic
ctrl+u => underlined
sorry for my bad english

karlbenson

Keywords shortcuts work in WYsiwyg mode.

i used ctrl + B  ctrl + i ctrl + u

Eliana Tamerin

eCardMax developed a free WYSIWYG editor for 1.1.4, but I don't know if he is going to upgrade that to 2.0.
Do NOT PM me for support.

SimplePortal 2.3.6 is OUT!
SimplePortal Project Manager
Download | Docs
SimplePortal: Power of Simplicity!

Oldiesmann

Quote from: Eliana Tamerin on March 18, 2008, 10:24:10 AM
eCardMax developed a free WYSIWYG editor for 1.1.4, but I don't know if he is going to upgrade that to 2.0.

Even that editor doesn't support WYSIWYG code and quote boxes...
Michael Eshom
Christian Metal Fans

Eliana Tamerin

That is true.

There are some things that just won't be coded into a WYSIWYG, no matter what. The best, and simplest way, is just to learn the BB codes. :P
Do NOT PM me for support.

SimplePortal 2.3.6 is OUT!
SimplePortal Project Manager
Download | Docs
SimplePortal: Power of Simplicity!

dfelix

how can i enable the wysiwyg editor?

I only see a option to disable it!

JMV290

Quote from: dfelix on March 18, 2008, 07:28:44 PM
how can i enable the wysiwyg editor?

I only see a option to disable it!
I believe it's enabled by default then if there is only an option to disable it.

Check your profile and look under look and layout.  "Show WYSIWYG editor on post page by default?", make sure it's checked.

karlbenson

WYSIWYG can be enabled
- board level (via Admin > Current Theme > Reset Options > [via the links])
- Global disable switch in Admin > Posts & Topics > Post Settings (Disable WYSIWYG editor)
- on an individual user basis (via Profile > Look and Layout > Show WYSIWYG editor on post page by default?",)

and also toggled on/off while writing the post.

dfelix

Thanks, JMV290....
The option was uncheked by default...


Dudelsack

Quote from: karlbenson on March 18, 2008, 08:42:52 AM
Keywords shortcuts work in WYsiwyg mode.

i used ctrl + B  ctrl + i ctrl + u
does not work for me, ctrl+b just opens my bookmarks (firefox)
sorry for my bad english

Eliana Tamerin

This is true. Ctrl+b and ctrl+i (why i, I don't know) both open the bookmarks sidepanel. Ctrl+u opens the source page as it's sent to the browser.

Strange, too, as I could uses these shortcuts in eCardMax' WYSIWYG editor without a problem. I know it works differently, it's just odd that he could bypass these hotkeys and SMF's editor can't.
Do NOT PM me for support.

SimplePortal 2.3.6 is OUT!
SimplePortal Project Manager
Download | Docs
SimplePortal: Power of Simplicity!

karlbenson

#14

Thantos

IIRC this is something that has to be changed in the browser itself.  I seem to recall an issue with FF 2 changing it so that ctrl-p didn't work as a shortcut to posting and instead had to use something like ctrl-shift-p.

Dudelsack

#16
Hi,

I have to use this topic again.
I just upgraded SMF 2 RC1 to RC2 and the shortcuts aren't working anymore (which worked before the upgrade).

If you try to use CTRL+B, or CTRL+I, or CTRL+U in Firefox on RC2 the bookmarks will open.
That only happens in Firefox, I've tested other Browsers (IE and Chrome) without that problem.

PS: problem exists only with firefox, shotcuts are working fine with other browsers like IE
sorry for my bad english

Leemy

@Dudelsack I am experiencing the same issue with FF (3.5.5).  I have posted this as a new topic in SMF 2.x Support: http://www.simplemachines.org/community/index.php?topic=352629.0

Advertisement: