new WYSIWYG-Editor event Plugin: CKEDITOR!

Creating and modifying plugins.
psiege
Regular
Posts: 52
Joined: Thu Mar 27, 2008 5:21 pm

Re: new WYSIWYG-Editor event Plugin: CKEDITOR!

Post by psiege » Tue Jun 11, 2013 4:46 pm

Hi Timbalu,

The Autosave feature isn't a huge requirement for me at this time, but is definitely a nice to have.

As far as making ACF a rule in the CKEDITOR plugin config, that might be a great idea. Personally, I enter lots of custom HTML into my entries, and this often includes custom CSS classes, which CKEDITOR removes by default. This reduces my ability to custom style an entry, especially if using Twitter Bootstrap to style buttons, forms, images, etc. These often times require a class specification.

Hope that helps!

Thanks,
Chris

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

Re: new WYSIWYG-Editor event Plugin: CKEDITOR!

Post by Timbalu » Tue Jun 11, 2013 5:22 pm

Hi Chris

Thank you. I just updated the plugin to the new CKEDITOR 4.1.2 and added the new config option. Default is using ACE true. Available via Spartacus tomorrow.

I did not really test the update, but I think I managed to guaranty a smooth upgrade.
Please give feedback, if all went well.
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: new WYSIWYG-Editor event Plugin: CKEDITOR!

Post by Timbalu » Wed Jun 12, 2013 11:40 am

Currently there seems to be a problem with the Github nightly run XML sync file. That is, why an update package is shown, but then on install only gets half processed, due to the ckeditor event plugins routine for updating, which needs the XML information. If Spartacus mirror/download points to github, no available update is currently shown.

Update 1.1.1/1.1.2 to 1.2.0
If you have already updated, you would need to manually purge the ckeditor/ and kcfinder/ directories (*), uninstall the CKEDITOR plugin via your Plugin list and install it again via plugin list/spartacus. Then all is well.

For the rest of you out there, wait with the update until the XML problem was sucessfully solved. I'll note that here.

(*) I know this is not the best way to have, since we could automatically purge these directories via the uninstall method, but this would hit those users out there, which extend the ckeditor package with more cke plugins etc. So, however we do, it will be inconvenient for someone! :wink:
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: new WYSIWYG-Editor event Plugin: CKEDITOR!

Post by Timbalu » Wed Jun 12, 2013 5:58 pm

Ok, I finally got it. :D

There was an error with the XML sync, which could get solved with Garvins help this afternoon and which will hopefully not hit us again.

But there also was something strange going on with the ckeditor plugin install method, not getting triggered by the final Spartacus upgrade.
This was a bug in the plugin itself, which is fixed now! I pushed an update to gitHub to version 1.2.1.
This will be available on Spartacus tomorrow, as usual! :wink: Cross your thumbs!
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 5:21 pm

Re: new WYSIWYG-Editor event Plugin: CKEDITOR!

Post by psiege » Wed Jun 12, 2013 6:04 pm

Thanks for all the work on this plugin, Timbalu! We appreciate it!

I have not yet tried the newest version. I'll wait until tomorrow and see how it works with the latest fixes.

Thanks!

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

Re: new WYSIWYG-Editor event Plugin: CKEDITOR!

Post by Timbalu » Wed Jun 12, 2013 6:46 pm

Thank you! :D

The unwanted behaviour on upgrades, which I hoped to have fixed finding this bug, can still exist in the upgrade tomorrow, as I cannot be sure, if the Spartacus upgrade will trigger the plugins installer routine as I hope it happen to be. As this can only be tested in live environments, I'll have to see this myself tomorrow. I note this here, since I just got a note by Garvin that this could very well be. (Thank you, Garvin!)

Please see by yourself, if the CKEDITOR toolbar [?] button announces itself as 4.1.2 (please force a browser reload first) and the old zip file "ckeditor_4.1.1_standard-plus.zip" is purged in the ckeditor plugin root.

If this is not the case, I'll need to fiddle again tomorrow!
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: new WYSIWYG-Editor event Plugin: CKEDITOR!

Post by Timbalu » Thu Jun 13, 2013 9:12 am

Well, yes, sorry to say, Garvin was right... :(

The Spartacus update process does not trigger the plugins install method, which is some kind of special here in this plugin, as I need to deflate the zip on install and upgrades.
Into the off: I wish we had some upgrade() API method for these cases.... or could have something related in the register process, which follows the HTTP update... Someone any ideas?

While I am fiddeling with that, possibly not today, please everybody just do update, reload plugins backend section, then purge the ckeditor plugin from your plugin list and (immediately) install it again. This will trigger the upgrade of all files already arrived by the previous Spartacus update.
Regards,
Ian

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

User avatar
kleinerChemiker
Regular
Posts: 765
Joined: Tue Oct 17, 2006 2:36 pm
Location: Vienna/Austria
Contact:

Re: new WYSIWYG-Editor event Plugin: CKEDITOR!

Post by kleinerChemiker » Thu Jun 13, 2013 10:31 am

you could write your own upgrade function.
In an extra var you save the version, to which the plugin is upgraded and check it against the actual version every time the plugin is used. if the versions differ, you run the upgrade routine and actualize the var.

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

Re: new WYSIWYG-Editor event Plugin: CKEDITOR!

Post by Timbalu » Thu Jun 13, 2013 10:45 am

Well yes, ...but the point I wanted to describe is, that an upgrade via Spartacus does not fall back to the plugins option page. If I come there, I would possibly find a way to trigger the routines I want to. But as I said, I would love to have it automatically right after the HTTP Spartacus request fetch.
Regards,
Ian

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

User avatar
kleinerChemiker
Regular
Posts: 765
Joined: Tue Oct 17, 2006 2:36 pm
Location: Vienna/Austria
Contact:

Re: new WYSIWYG-Editor event Plugin: CKEDITOR!

Post by kleinerChemiker » Thu Jun 13, 2013 11:08 am

of course, an automatic routine would be better, since its useable for other plugins too. i just wanted to give you an idea how you might solve the problem until there is an upgrade-function.

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

Re: new WYSIWYG-Editor event Plugin: CKEDITOR!

Post by garvinhicking » Thu Jun 13, 2013 11:52 am

You could hook into 'backend_configure', that would be executed just in the next pagecall...
# 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
Timbalu
Regular
Posts: 4598
Joined: Sun May 02, 2004 3:04 pm

Re: new WYSIWYG-Editor event Plugin: CKEDITOR!

Post by Timbalu » Thu Jun 13, 2013 7:48 pm

@kleinerChemiker
Sure, thanks noting.
I just wanted to make clear, that I would like to avoid this, spoiling the runtime with upgrade tasks! And as yourself wrote, having an upgrade API method would be the cleanest and would help us all.

@garvinhicking
Isn't that hook the same, just a ... workaround spoiling runtime?
Or is 'backend_configure' the one I am searching for, doing the automated register process right after Spartacus http fetch? Would it not need an extra click for the user?
Heretofore I understood this hook to take place on every backend request, which still should be something I call "making runtime filthy dirty", even if checking if it has already run.
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: new WYSIWYG-Editor event Plugin: CKEDITOR!

Post by Timbalu » Sat Jun 29, 2013 11:34 am

Yesterdays 1.2.2 update brought an extra Serendipity Media Library button to the ckeditor plugin, for all the ones being used to it.

It was brought to my attention this morning, that embedding videos per iframe with the ckeditor is doing strange things. Please read this topic and on how to solve this issue:
http://board.s9y.org/viewtopic.php?f=2& ... #p10435684
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: new WYSIWYG-Editor event Plugin: CKEDITOR!

Post by Timbalu » Sat Jun 29, 2013 6:45 pm

For the ones who still like to use an autosave with CKEDITOR, due to the fact that Serendipity Plugin autosave isn't working (yet), there seems to be a CKEDITOR internal plugin solution: http://ckeditor.com/addon/autosave
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: new WYSIWYG-Editor event Plugin: CKEDITOR!

Post by Timbalu » Thu Jul 25, 2013 7:56 pm

=== TEASER === for upcoming update to 1.3.... :)

The new Serendipity 1.7.2 release does bring along a fantastic solution for plugin updates, being executed right after http-fetching the files by Spartacus. (Thanks to Garvin!)

Readers, you all remember, we had the problem with new ckeditor lib versions, needing this ckeditor plugins ZIP-File being executed on plugin updates. This did not work in 1.7 with Spartacus updates without having to work around, spoiling the runtime workflow. The only way without that workaround, was to run the Spartacus update, deinstall the plugin in the plugin list and immediately install it again (without the need to deinstall it physically), which is not a biggy (unless you don't know this).

So I will push out a new release next week including the new bugfixed 4.1.3 ckeditor lib. This is the ChangeLog until now:
  • Added mediaembed (see media icon) CKEDITOR Plugin, to not need to turn off ACF Filter for iframed media items
  • Added new Serendipity 1.7.1 'backend_plugins_update' update hook to trigger installation deflating routines on upgrades
  • Updated CKEDITOR Library to version 4.1.3
  • Added additional lang notes for manually added CKEDITOR-Plugin placements in the config
Users knowing, that ckeditor also released the new 4.2 Lib version some days ago, will notice, that I haven't included that by yet. I want to wait a little bit more to see how it works and if there are any tweaks needed to run with our Plugin. And this will certainly help us proving this new update hook a little more soon. ;-)

I thought about on how to do this updating lib/zip-deflating routine for those users, wanting to stick to the 1.7 release, without updating to Serendipity 1.7.2. But it seems better for me and the plugins codebase, to just use this new hook for 1.7.2 users only and advertise the upper bolded update routine here again, which is so clearly simple, that I could not do this any better by working around this issue in the plugins code. Remember, this is and will only be an issue for updaters and "1.7-stickies", if the zip and lib has changed! :wink:

What do you think?
Regards,
Ian

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

Post Reply