[2.0] New WYSIWYG editor

Mark threads with "[2.0]" for discussions about features in the longer-term future, "[1.6]" is for short-term. This is not the place for general discussions or plugin or template requests. Only features that are approved to happen by the core team should be listed here for better structuring.
User avatar
Timbalu
Regular
Posts: 4598
Joined: Sun May 02, 2004 3:04 pm

Re: [2.0] New WYSIWYG editor

Post by Timbalu » Wed Mar 12, 2014 5:20 pm

As I said, serendipity_event_ckeditor plugin works out of the box, since independ using its own function for all kind of backend textareas.

I surely will test the core ckeditor to do the same. But the upgrade will take some time.

If that is done, I can check serendipity_event_fckeditor for sure.
* Does serendipity_event_autosave work with this WYSIWYG component?
This does not work with any WYSIWYG component, AFAIK.
* Does serendipity_event_emoticonchooser work with this WYSIWYG component?
serendipity_event_ckeditor YES! Also the amazonchooser and linktrimmer plugins.
* Does serendipity_event_wikilinks work with this WYSIWYG cpomponent?
Don't know (*)
* Does serendipity_event_faq work with this WYSIWYG component?
Don't know (*)
* Does serendipity_event_includeentry work with this WYSIWYG component?
serendipity_event_ckeditor YES (I think)
* Does serendipity_event_youtube work with this WYSIWYG component?
Don't know (*)

(*) do these plugins hook into toolbar via button, or need just to be checked, since using a certain markup?
Regards,
Ian

Serendipity Styx Edition and additional_plugins @ https://ophian.github.io/ @ https://github.com/ophian

User avatar
yellowled
Regular
Posts: 7002
Joined: Fri Jan 13, 2006 12:46 pm
Location: Eutin, Germany
Contact:

Re: [2.0] New WYSIWYG editor

Post by yellowled » Wed Mar 12, 2014 7:03 pm

garvinhicking wrote:* serendipity_event_fckeditor (if that doesn't work, I wouldn't pay attention)
fckeditor is dead. It was the predecessor of CK Editor. I mean, even Microsoft stops supporting old software at some point now …

YL
amazon Wishlist - Serendipity-Podcast (German only, sorry)

User avatar
garvinhicking
Core Developer
Posts: 30014
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: [2.0] New WYSIWYG editor

Post by garvinhicking » Thu Mar 13, 2014 12:29 pm

I had a look at TinyMCE. They changed their API in 3.x and also in 4.x, so much has changed that it wouldn't be fair game to adapt to their API. So let's discern TinyMCE.

FCKEditor as mentioned is succeeded by CKEditor, so I think we should drop the ball on that as well.

I just checked the Xinha plugin and made some adjustments so that it could work somewhat. There's currently an issue with the media manager, that I've posted to our issue tracker.

While investigating, one thing I found that was doable with the core Xinha previously: A "my_custom.js" file could be filled (and even put into one's template directory) to adapt the toolbars and config of Xinha to ones liking. What is the preferred way for people to customize the toolbar, font options, CSS etc. for CKEditor? A similar function would need to exist, I'd even regard this as a RC-stopper. I don't think we would need to add so many configuration functions, I believe users who would want to change that would need a way to provide their own JS file with an init handler easily?

Another alternative I would be fine with is to make the CKEditor plugin able to provide all that easily, then we would tell users to install this plugin if they want specific configuration options. In that case, we definitely need the plugin for the RC-release be ready to offer custom JS and CSS, without editing core or plugin files, and being able to make a template affect this.

Also, how does CKEditor currently handle the language of its interface? In admin/wysiwyg_init.tpl there's no reference to any language?
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/

User avatar
onli
Regular
Posts: 2214
Joined: Tue Sep 09, 2008 10:04 pm
Contact:

Re: [2.0] New WYSIWYG editor

Post by onli » Thu Mar 13, 2014 12:38 pm

garvinhicking wrote:What is the preferred way for people to customize the toolbar, font options, CSS etc. for CKEditor?
All that right now is controlled by https://github.com/s9y/Serendipity/blob ... g_init.tpl. In my opinion, it is enough that this is smartified. But you are more thinking of an integrated mechanism? We could have a look how much of that is changeable via the CKEDITOR-object and reference a js-file in that template.

The language is automatically detected by default, browser settings, iirc. That is configurable (with language: 'de' on init, or a configuration file I think), but we don't expose that yet.

User avatar
garvinhicking
Core Developer
Posts: 30014
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: [2.0] New WYSIWYG editor

Post by garvinhicking » Thu Mar 13, 2014 1:48 pm

Hi!
All that right now is controlled by https://github.com/s9y/Serendipity/blob ... g_init.tpl. In my opinion, it is enough that this is smartified. But you are more thinking of an integrated mechanism? We could have a look how much of that is changeable via the CKEDITOR-object and reference a js-file in that template.
The language is automatically detected by default, browser settings, iirc. That is configurable (with language: 'de' on init, or a configuration file I think), but we don't expose that yet.
I think both would be great to have; this way nobody needs to tamper with an admin template, and could place the JS file inside a normal directory.

Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/

User avatar
yellowled
Regular
Posts: 7002
Joined: Fri Jan 13, 2006 12:46 pm
Location: Eutin, Germany
Contact:

Re: [2.0] New WYSIWYG editor

Post by yellowled » Thu Mar 13, 2014 3:03 pm

garvinhicking wrote:A "my_custom.js" file could be filled (and even put into one's template directory) to adapt the toolbars and config of Xinha to ones liking. What is the preferred way for people to customize the toolbar, font options, CSS etc. for CKEditor?
Don't. :mrgreen:

Just my personal experience: giving end users the possibility to customize anything in a wysiwyg editor is opening pandora's box while sitting on a can of worms, if you know what I mean. End users usually don't even want to do that, they will happily accept what you give them. Of course there's power users, but they will find out how to do it anyway.

YL
amazon Wishlist - Serendipity-Podcast (German only, sorry)

User avatar
garvinhicking
Core Developer
Posts: 30014
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: [2.0] New WYSIWYG editor

Post by garvinhicking » Thu Mar 13, 2014 3:44 pm

Just my personal experience: giving end users the possibility to customize anything in a wysiwyg editor is opening pandora's box while sitting on a can of worms, if you know what I mean. End users usually don't even want to do that, they will happily accept what you give them. Of course there's power users, but they will find out how to do it anyway.
I see your point, but exactly the opposite is true: Companies and such using Serendipity for their corporate blog need to be able to restrict their users, so that they only have specific fonts, sizes and buttons available. This needs to be supported, and needs to happen easily.

Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/

User avatar
yellowled
Regular
Posts: 7002
Joined: Fri Jan 13, 2006 12:46 pm
Location: Eutin, Germany
Contact:

Re: [2.0] New WYSIWYG editor

Post by yellowled » Thu Mar 13, 2014 5:44 pm

garvinhicking wrote:I see your point, but exactly the opposite is true: Companies and such using Serendipity for their corporate blog need to be able to restrict their users, so that they only have specific fonts, sizes and buttons available. This needs to be supported, and needs to happen easily.
My personal take on this is that if that were the case, the company a) would be abusing the wysiwyg editor and b) would have a theme which doesn't work very well. However, once the “client wants this” card comes into play, arguments like this usually don't work very well.

My suggestion would be (if that's technically posssible) a “power user mode” for wysiwyg editors, which needs to be explicitly activated. Meaning in “standard mode”, wysiwyg editors offer a preselected configuration which includes only the stuff really necessary. If you want or need stuff like being able to set font-sizes, colors and other stuff inline, you need to activate “power user mode” which gives you all the possibilities the wysiwyg editor has to offer.

YL
amazon Wishlist - Serendipity-Podcast (German only, sorry)

User avatar
onli
Regular
Posts: 2214
Joined: Tue Sep 09, 2008 10:04 pm
Contact:

Re: [2.0] New WYSIWYG editor

Post by onli » Thu Mar 13, 2014 5:51 pm

I understood Garvin exactly the other way around: that they want to restrict the editor even further than we do already.

User avatar
Timbalu
Regular
Posts: 4598
Joined: Sun May 02, 2004 3:04 pm

Re: [2.0] New WYSIWYG editor

Post by Timbalu » Thu Mar 13, 2014 5:54 pm

yellowled wrote:fckeditor is dead. It was the predecessor of CK Editor.
Even if CKEDITOR is the better follow-up editor, it is not dead! And is still supported on SF http://sourceforge.net/projects/fckeditor/
I updated the plugin for this last may.
Regards,
Ian

Serendipity Styx Edition and additional_plugins @ https://ophian.github.io/ @ https://github.com/ophian

User avatar
yellowled
Regular
Posts: 7002
Joined: Fri Jan 13, 2006 12:46 pm
Location: Eutin, Germany
Contact:

Re: [2.0] New WYSIWYG editor

Post by yellowled » Thu Mar 13, 2014 5:55 pm

onli wrote:I understood Garvin exactly the other way around: that they want to restrict the editor even further than we do already.
Wow. I completely misread Garvin's statement. Sorry, my mistake.

YL
amazon Wishlist - Serendipity-Podcast (German only, sorry)

User avatar
onli
Regular
Posts: 2214
Joined: Tue Sep 09, 2008 10:04 pm
Contact:

Re: [2.0] New WYSIWYG editor

Post by onli » Thu Mar 13, 2014 5:57 pm

Ian, that it is dead is even said on that very page:
FCKeditor is the previous version of CKEditor and has been discontinued after version 2
Don’t force yourself with retro FCKeditor. Switch to the new, cool CKEditor by getting it on the following Web Site (use the link below).

User avatar
yellowled
Regular
Posts: 7002
Joined: Fri Jan 13, 2006 12:46 pm
Location: Eutin, Germany
Contact:

Re: [2.0] New WYSIWYG editor

Post by yellowled » Thu Mar 13, 2014 5:58 pm

Timbalu wrote:I updated the plugin for this last may.
Even the SF page (SF is more or less dead as well, BTW) states multiple times that CKE should be preferred. At least that's how I read it.

To me that's as if we would still support IE6 and 7 because, hey, there's still people out there using it.

YL
amazon Wishlist - Serendipity-Podcast (German only, sorry)

User avatar
Timbalu
Regular
Posts: 4598
Joined: Sun May 02, 2004 3:04 pm

Re: [2.0] New WYSIWYG editor

Post by Timbalu » Thu Mar 13, 2014 6:06 pm

The core CKEDITOR will get a custom config file anyway! That is my plan.

And will possibly give up to use the wysiwyg_init.tpl, in replace with an include file in the head or end of body and adding some starters via the js hook, if this is possible.

Adding an option to the serendipity_emit_htmlarea_code() function, to also check for a custom config file in custom template, is nothing bad to have, if we say "use at your own risk"!

Else, anybody is able to just easy replace the shipped standard htmlarea/ckeditor package with an extended or less functional "mini" package, without needing to change anything else.
yellowled wrote:To me that's as if we would still support IE6 and 7 because, hey, there's still people out there using it.
But that is not the real point. If anyone wants to use another Editor by Plugin, old or not, it should work out of the box with Serendipity, at least for the core backend textareas (and it does with "old" fckeditor) .
Regards,
Ian

Serendipity Styx Edition and additional_plugins @ https://ophian.github.io/ @ https://github.com/ophian

User avatar
Timbalu
Regular
Posts: 4598
Joined: Sun May 02, 2004 3:04 pm

Re: [2.0] New WYSIWYG editor

Post by Timbalu » Fri Mar 14, 2014 12:24 pm

As far as I see, the 2k11 serendipity_plugin_api_pre_event_hook() is used to propagate the serendipity_editor.js.tpl template into the /index.php?/plugin/admin/serendipity_editor.js
https://github.com/s9y/Serendipity/blob ... c.php#L113

Now my question:
Is that really absolutely specific to 2k11 config.inc.php, or shouldn't we better move this into core somewhere?
Is this even possible to do, or is the use of serendipity_plugin_api_pre_event_hook() only doable in template configs?
Regards,
Ian

Serendipity Styx Edition and additional_plugins @ https://ophian.github.io/ @ https://github.com/ophian

Locked