new WYSIWYG-Editor event Plugin: CKEDITOR!

Creating and modifying plugins.
Post Reply
Timbalu
Regular
Posts: 4598
Joined: Sun May 02, 2004 3:04 pm

new WYSIWYG-Editor event Plugin: CKEDITOR!

Post by Timbalu »

The new CKEDITOR WYSIWYG-Editor Plugin "serendipity_event_ckeditor" has been released finally. It requires using Serendipity 1.7 and up.

CKEDITOR currently is the state-of-the-Art Editor on market and is recommended to use as the Standard WYSIWYG-Editor within Serendipitys backend textareas.

Serendipity until now offered FCKeditor (which has just been updated), TinyMCE and Xinha as WYSIWYG editors. The Xinha Editor is the build-in-by-Core Editor, which needs no further installations, except turning on the WYSIWYG-Mode.
This last one also exists as a very old Plugin, which still is available, but not recommeded to use, since Serendipity offered Xinha by core for quite a few years now (since 12/2008).

So all these previous Plugins, and also the core built-in one, have come into years, and we were looking to find something better for the upcoming 2.0 Version of Serendipity and quickly found CKEDITOR to be the best and nice looking Editor around.
But sadly the CKEDITOR license will not allow us to bundle it into Serendipity Core, until they are happy to give us a professional or commercial license for free (hint!). EDIT: While building the 2.0-Alpha, we found a way to replace old Xinha with CKEDITOR in core!
Thanks to the initial Rustam Abdullaev Plugin, brought in by a Pull Request some month ago, we are now able to release this fine new editor into the public even earlier with Serendipity 1.7!

The new CKEDITOR Plugin, available via Spartacus, uses the Standard downloadable package 4.1.1 by default and also integrates the last available developer version of the free KCFINDER Browse/Upload Package by Pavel Tzonkov, which nearly seamlessly offers full access to the Serendipity Media Library (in "/uploads/images/").

CKEDITOR is much more neat and cleaner than other editors, and supports most of the basics of WYSIWYG in this plugins delivered standard package. Our plugin now also supports the cool integrated button hooks by other Serendipity Plugins (*), which have been updated the last few weeks around the Release of Serendipity 1.7, to support this new Editor. Also the NL2BR Plugin has been updated a while ago in May 2012, to not get in conflicts using a WYSIWYG-Editor, so there is no need to deinstall this Plugin (**). CKEDITOR will install itself automatically, as soon as you install it via Spartacus in your Plugin List.

We hope you have fun using this new cool Plugin!

(*) These are by now linktrimmer and amazonchooser by hooks and emoticonchooser by drop in.

(**) Please also read board.s9y.org/viewtopic.php?f=2&t=19336 to avoid conflicts switching between non/wysiwyg-Editor modes in general.

________________________________________________________________________________
2016 - 2018
Since CKEditor 4.5.8.1, in April 2016, you can get all further versions with the Serendipity Styx Edition, which is a fully supported Serendipity Next installation and the Styx additional_plugins @ https://ophian.github.io/. Please regard the s9y Spartacus announced version CKEditor 4.5.10.3 as not supported and not fully synced, giving you anything, but not the announced and required version!
See you at Styx!
Ian
________________________________________________________________________________

German lang translation:
==============================================================================================

Das neue CKEDITOR WYSIWYG-Editor Plugin "serendipity_event_ckeditor" wurde soeben veröffentlicht. Es benötigt Serendipity 1.7 oder höher um vollständig zu funktionieren.

Auf dem Marktplatz der WYSIWYG Editoren liegt CKEDITOR weit an der Spitze und wir empfehlen dieses neue Plugin als Standard JS Editor im Serendipity Backend zu benutzen.

Bisher waren FCKeditor (gerade wieder neu veröffentlicht), TinyMCE und Xinha als WYSIWYG Editoren in Serendipity als Plugins erhältlich. Der Xinha Editor wurde sogar bereits seit mehreren Jahren im Serendipity Kern mitgeliefert (12/2008) und benötigte keine weitere Plugin Installation, als den WYSIWYG Modus einzuschalten. Dieser letzte Editor war auch als altes Plugin erhältlich, das immer noch installiert werden kann, aber nicht zu empfehlen ist, da es noch auf eine Zeit vor der Kern Integration zurückgeht.

All diese vorherigen Plugins, ebenso wie das im Kern mitgelieferte, sind etwas (sehr) in die Jahre gekommen und so begaben wir uns für das kommende Serendipity 2.0 auf die Suche nach einem neuen "Look and Feel" und stießen bald auf den sich gut entwickelnden CKEDITOR.
Leider verbieten uns Lizenz Probleme diesen nahtlos in den Serendipity Kern einzubauen und den (alten) Htmlarea/Xinha Editor zu ersetzen, der nicht mehr recht weiterentwickelt wird. So können wir nur darauf hoffen, irgendwann eine freie professional oder commercial License seitens CKEDITOR für Serendipity zu bekommen, die dieses Problem beseitigt (!). EDIT: Während der 2.0-Alpha Entwicklerphase haben wir dann doch noch eine Möglichkeit gefunden, den alten Xinha mit CKEDITOR im Serendipity Kern zu ersetzen!
Dank des initialen Pull Requests von Rustam Abdullaev, können wir aber nun diesen schönen neuen Editor als Plugin für Serendipity 1.7 veröffentlichen.

Das neue CKEDITOR Plugin, zu beziehen über Spartacus, benutzt das Standard Paket 4.1.1 als Voreinstellung und integriert ebenfalls die letzte developer Version des freien KCFINDERs Browse/Upload Paketes von Pavel Tzonkov, das sich beinahe nahtlos in die Serendipty Mediengalerie einfügt, bzw. diese nutzt (in "/uploads/images/").

CKEDITOR ist insgesamt viel übersichtlicher als andere Editoren, dafür etwas eingeschränkter in der Standard Paket Version. Das Plugin kann die coolen integrierten Button hooks anderer Serendipity Plugins in die Toolbar integrieren (*), die in den letzten Wochen, um dass Serendipity 1.7 release herum, daraufhin aktualisiert wurden. Auch das alte NL2BR Plugin kann seit ca einem Jahr die alten möglichen Konflikte mit WYSIWYG Editoren vergessen machen und braucht nicht mehr deinstalliert zu werden (**). Das CKEDITOR Plugin installiert sich automatisch und vollständig, sobald es via Spartacus in der Plugin Liste aktiviert bzw ausgewählt wird.

Wir hoffen, Ihr habt viel Freude mit diesem neuen coolen Plugin!

(*) Diese sind bis jetzt linktrimmer und amzonchooser über hooks und emoticonchooser über ein Drop-in.

(**) Bitte lese dazu auch board.s9y.org/viewtopic.php?f=2&t=19336, um eventuelle Konflikte in der wechselseitigen Benutzung von non/wysiwyg-Editor Einstellungen generell zu vermeiden.


________________________________________________________________________________
2016 - 2018
Seit CKEditor 4.5.8.1, im April 2016, werden alle folgenden Versionen mit der Serendipity Styx Edition, einer gepflegten und voll unterstützten Serendipity Next Installation und den Styx additional_plugins @ https://ophian.github.io/ ausgeliefert. Betrachtet die per s9y Spartacus ausgelieferte CKEditor 4.5.10.3 Version als nicht von mir supported und als unvollständige Synchronisierung, die euch irgendetwas, aber nicht die versprochene Version ausliefert!
See you at Styx!
Ian
________________________________________________________________________________
Last edited by Timbalu on Sat May 26, 2018 12:20 pm, edited 5 times in total.
Regards,
Ian

Serendipity Styx Edition and additional_plugins @ https://ophian.github.io/ @ https://github.com/ophian
yellowled
Regular
Posts: 7111
Joined: Fri Jan 13, 2006 11:46 am
Location: Eutin, Germany
Contact:

Re: new WYSIWYG-Editor event Plugin: CKEDITOR!

Post by yellowled »

The forum smilies are missing a “thumbs up” smiley. Having already beta-tested this, I can say this is very good for s9y – finally, a very usable WYSIWYG editor which should integrate well with any kind of backend. Great job! :)

Dev question: this should already work with the 2.0 branch as well, right?

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

Re: new WYSIWYG-Editor event Plugin: CKEDITOR!

Post by Timbalu »

Thank you! I need this at last! :)
yellowled wrote:Dev question: this should already work with the 2.0 branch as well, right?
Yes, it should, but the js changes into core were not upported to 2.0 yet, while I awaited Onli to put this in, since he was working on his "jQuery-fy-Washer". :wink:
Regards,
Ian

Serendipity Styx Edition and additional_plugins @ https://ophian.github.io/ @ https://github.com/ophian
yellowled
Regular
Posts: 7111
Joined: Fri Jan 13, 2006 11:46 am
Location: Eutin, Germany
Contact:

Re: new WYSIWYG-Editor event Plugin: CKEDITOR!

Post by yellowled »

Timbalu wrote:Yes, it should, but the js changes into core were not upported to 2.0 yet, while I awaited Onli to put this in, since he was working on his "jQuery-fy-Washer". :wink:
I have no idea what this is supposed to mean, but I'll assume that it does not work with 2.0 yet.

YL
Czorneboh
Regular
Posts: 385
Joined: Tue Apr 08, 2008 7:17 pm
Location: Berlin
Contact:

Re: new WYSIWYG-Editor event Plugin: CKEDITOR!

Post by Czorneboh »

Great!

I am happy to read this message.

Yes, I am missing the thumbs-up-smily too. :D

But I will wait until first update for 1.7 too, to see and use it.
Timbalu
Regular
Posts: 4598
Joined: Sun May 02, 2004 3:04 pm

Re: new WYSIWYG-Editor event Plugin: CKEDITOR!

Post by Timbalu »

@YL I am in contact with Malte to get this sorted out... EDIT: this is not done by now!
Czorneboh wrote:But I will wait until first update for 1.7 too, to see and use it.
That is why I did it.... to get all folks finally upgrade to the current S9y Release (just kidding...)! :lol:
Regards,
Ian

Serendipity Styx Edition and additional_plugins @ https://ophian.github.io/ @ https://github.com/ophian
Timbalu
Regular
Posts: 4598
Joined: Sun May 02, 2004 3:04 pm

Re: new WYSIWYG-Editor event Plugin: CKEDITOR!

Post by Timbalu »

Updates:
CKEDITOR has been updated on Jun 01, 2013 to v.1.1.1, fixing a small debug leftover in kcfinders image browser, which then could not get loaded properly.

I now (Jun 05, 2013) added v.1.1.2, to fix the Serendipity Media Library not to show up kcfinder's Image Browser preview images in /uploads/.thumbs dir.
This will be available via Spartacus tomorrow.

Edit:
If you already had some uploaded images via kcfinder and viewed your Serendipity Media Library sometime afterwards, this Plugins update will force the S9y Media Library (as soon as re-opened) to run its internal cleanup function. This is good and does no harm to any of your uploaded images. It just removes some unnecessary Doublettes. :)
Regards,
Ian

Serendipity Styx Edition and additional_plugins @ https://ophian.github.io/ @ https://github.com/ophian
psiege
Regular
Posts: 52
Joined: Thu Mar 27, 2008 4:21 pm

Re: new WYSIWYG-Editor event Plugin: CKEDITOR!

Post by psiege »

Attempting to install the CKEditor and I receive the following Error:

Code: Select all

Trying to open URL package_event_en.xml...
Fetched 462996 bytes from already existing file on your server. Saving file as {obfuscated}/blog/templates_c/package_event_en.xml...
Trying to open URL lang_de.inc.php?revision=1.9999...
Fetched 3558 bytes from the URL above. Saving file as {obfuscated}/blog/plugins/serendipity_event_ckeditor/UTF-8/lang_de.inc.php...
Data successfully fetched.
Trying to open URL lang_en.inc.php?revision=1.9999...
Fetched 3357 bytes from the URL above. Saving file as {obfuscated}/blog/plugins/serendipity_event_ckeditor/UTF-8/lang_en.inc.php...
Data successfully fetched.
Trying to open URL ckeditor_4.1.1_standard-plus.zip?revision=1.9999...

[b]Fatal error: Allowed memory size of 18874368 bytes exhausted (tried to allocate 1651856 bytes) in {obfuscated}/blog/bundled-libs/HTTP/Request.php on line 729[/b][/quote]

Thus, the plugin does not install.

Any suggestions as to what's happening here?

Thanks!
Chris
Timbalu
Regular
Posts: 4598
Joined: Sun May 02, 2004 3:04 pm

Re: new WYSIWYG-Editor event Plugin: CKEDITOR!

Post by Timbalu »

Yes, increase the allowed memory size for your server, meaning PHP.

Just a second. I add a link on how to do.

Edit after some seconds:
Try to add to your serendipity .htaccess file

Code: Select all

php_value memory_limit "16M"
or more.

Or drop a php.ini file into serendipity root, with following content

Code: Select all

[PHP]

;;;;;;;;;;;;;;;;;;;
; Resource Limits ;
;;;;;;;;;;;;;;;;;;;

;;;;max_execution_time = 30     ; Maximum execution time of each script, in seconds
;;;;max_input_time = 60   ; Maximum amount of time each script may spend parsing request data
memory_limit = 12M      ; Maximum amount of memory a script may consume (8MB)

; Maximum size of POST data that PHP will accept.
post_max_size = 10M

; Maximum allowed size for uploaded files.
upload_max_filesize = 10M
and start to finetune the values.
Regards,
Ian

Serendipity Styx Edition and additional_plugins @ https://ophian.github.io/ @ https://github.com/ophian
psiege
Regular
Posts: 52
Joined: Thu Mar 27, 2008 4:21 pm

Re: new WYSIWYG-Editor event Plugin: CKEDITOR!

Post by psiege »

Thanks for that fix Timbalu! The plugin is now installed, however when I visit the editor, it doesn't appear. I have enabled WYSIWYG editor in my user settings and the plugin is Active. I have also checked the paths and they seem correct.

The editor is now a plain text box, no bold, underline, or any other button like I had before. The only buttons I have now are Save and Preview.

Any suggestions?

Edit:
This is how my editor looks now...
blog_editor.png
blog_editor.png (66.25 KiB) Viewed 30882 times
Edit:
Well, I removed all old editors, purging the plugins directory of them and now I have the basic WYSIWYG editor back. However, reinstalling the CKEditor and enabling it again removes ALL editors. Ugh :(

Thanks!
Timbalu
Regular
Posts: 4598
Joined: Sun May 02, 2004 3:04 pm

Re: new WYSIWYG-Editor event Plugin: CKEDITOR!

Post by Timbalu »

What do you mean by (removed/es) "all" or "other editors"?
Having more than one wysiwyg-editor plugin installed is not advised. At least push the ones not used to the hidden plugin list and save that order. If you mean, installing a wysiwyg-editor does remove the toolbar with the BBC Buttons (plain text editor) - well yes, this is the default behaviour in Serendipity core, since it replaces it with the wysiwyg-editor.

To the problem. (...guessing into the blue...)
I can not really imagine why this should happen like this. (Maybe you still don't have enough RAM available?) This somehow seems to be a problem of incorrect loading the ckeditor js (files).

- Do you really have Serendipty 1.7?
- Is Javascript allowed in your browser?
- Where in your plugin list (in order) is the ckeditor plugin?
- Is the CKEDITOR Plugin internal zip correct installed, meaning deflated to ckeditor/ and kcfinder/ directories?
- Visit your Browsers Developer Web-Console or log (this named in FF) and see what it says after reload.

Also please try, if the autosave plugin might badly interfere with it and disable it temporary. This is by chance the most possible Plugin, which could hack the wysiwyg-editors badly to stop procession. It says, it does not work with Xinha (yet) and as being older, certainly never has been touched to work with new CKEDITOR. Even the predecessor FCKeditor wasn't supported, as far as I can see.

If that all does not help, there might be other additional plugins which interfere badly too. Disable them one by one to find out, please.
Regards,
Ian

Serendipity Styx Edition and additional_plugins @ https://ophian.github.io/ @ https://github.com/ophian
psiege
Regular
Posts: 52
Joined: Thu Mar 27, 2008 4:21 pm

Re: new WYSIWYG-Editor event Plugin: CKEDITOR!

Post by psiege »

Thanks again Timbalu, the problem was the Autosave plugin. I moved it to the hidden plugin list and the editor finally started working.

Thanks for all of your help!
psiege
Regular
Posts: 52
Joined: Thu Mar 27, 2008 4:21 pm

Re: new WYSIWYG-Editor event Plugin: CKEDITOR!

Post by psiege »

On to another issue in which you may be able to offer assistance. ;)

I'm interested in turning off CKEditor's Advance Content Filter, which is accomplished by setting CKEDITOR.config.allowedContent to true

I added the following line to config.js: config.allowedContent = true;

It now looks like this:

Code: Select all

CKEDITOR.editorConfig = function( config ) {
	// Define changes to default configuration here.
	// For the complete reference:
	// http://docs.ckeditor.com/#!/api/CKEDITOR.config
	
	// Disable Advanced Content Filter to allow for custom styling and HTML
	config.allowedContent = true;
...
But this doesn't change anything. CKEditor is still stripping my classes when I switch from Source view. Any suggestions?
psiege
Regular
Posts: 52
Joined: Thu Mar 27, 2008 4:21 pm

Re: new WYSIWYG-Editor event Plugin: CKEDITOR!

Post by psiege »

Seems I was editing the wrong file! ;)

I instead added CKEDITOR.config.allowedContent = true; to serendipity.event.ckeditor.php and it worked! Change is around line 248 and looks like this in case anyone else is interested in removing CKEditors Advanced Content Filter:

Code: Select all

<script type="text/javascript">
        CKEDITOR.config['skin'] = 'moono';
        CKEDITOR.config['height'] = 400;
        CKEDITOR.config.removePlugins = 'flash,iframe';
        CKEDITOR.config.allowedContent = true;
Thanks!
Timbalu
Regular
Posts: 4598
Joined: Sun May 02, 2004 3:04 pm

Re: new WYSIWYG-Editor event Plugin: CKEDITOR!

Post by Timbalu »

Fine you got that solved!

Autosave is quite old but may be further developed to use Browser Storage in future. There already is a testplugin at http://board.s9y.org/viewtopic.php?f=4&t=19368- But it still seems to need some work to run successfully with WYSIWYG-Editors.

Is there any need to make the ACF rule a CKEDITOR PLugin config option? I cannot really say this could be a wish for more people to set this off, when using own plugins or other content including none supported html. (*)
What do you mean?
(*) What Impact Does ACF Have on Plugins?

Advanced Content Filter (ACF) is a set of rules that determine which editor features will be available to the user. It limits and adapts input data so it matches the editor configuration in the best possible way. It may also deactivate features which generate HTML code that is not allowed by the configuration.

How does it affect plugins? If your plugin generates content, you will need to update it so that it would extend the default CKEditor filters and make the editor accept this content.
Regards,
Ian

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