Page 7 of 12

Re: new WYSIWYG-Editor event Plugin: CKEDITOR!

Posted: Thu Dec 05, 2013 11:26 am
by yellowled
ICE wrote:I don't know why ... installing ckeditor updates only work, if i delete the plugin directory by hand and make a new install.
That does not work for me.

YL

Re: new WYSIWYG-Editor event Plugin: CKEDITOR!

Posted: Thu Dec 05, 2013 11:40 am
by yellowled
Another funny thing: In a 1.7.4-beta1 test blog, I only get

Code: Select all

Uncaught SyntaxError: Unexpected token = cke_plugin.js:50
with the same CKEditor version (2.3.1) in the same browser (Chrome). Still doesn't work, though.

YL

Re: new WYSIWYG-Editor event Plugin: CKEDITOR!

Posted: Thu Dec 05, 2013 2:32 pm
by yellowled
Okay, there seems to be some weird (caching?) issue in play here. I just logged into the blog in question again to play with CK Editor again, and now 2.3.1 works in Chrome here, too. So the whole “remove it via FTP and reinstall instead of updating” seems to have worked here. Huh.

YL

Re: new WYSIWYG-Editor event Plugin: CKEDITOR!

Posted: Thu Dec 05, 2013 3:35 pm
by Timbalu
Yes, I am sorry for this.

Remember, I once wanted to have an upgrade hook to make it possible to fall right back to config on Spartacus fetch upgrades. Garvin made that available and I thought I did get this to work fine.

But I think I have tried about three live upgrades now, with different setups, and never really got it to work how I needed it to be. This Spartacus fetch needs a forced fallback, to execute the cke zip deflating properly, before new configs are set.

So as long as this will not take effect, we have to go that list purge and install route on upgrades. [*]

You can for now check, if that deflating happened successful, if you have a look at the noted version number in the head of ckeditor/plugins/procurator/plugin.js file, since the cke version at [?] button did not change this time. The procurator plugin.js file has to be v. 1.1.


[*] Or I have to decide to relinquish to have a pre-packed version, but this would mean to fetch 6-8MB of data and nearly 800 files... :shock:

Re: new WYSIWYG-Editor event Plugin: CKEDITOR!

Posted: Fri Dec 06, 2013 1:00 pm
by garvinhicking
Hi!

I think the problem is this: The update hook cannot get executed, because the PHP code that is inside the plugin for the UPDATED version only gets loaded AFTER the request where it is installed.

So, when I click on update, in the RAM of the server, the old PHP code of each plugin is contained, also the "old" update routines. Now I update the plugin, the RAM still holds the old code. The PHP file is fetched, stored (all within the same request), and then the event hook of the *OLD* plugin is executed. Only after the NEXT page request will the NEW php code of the plugin be available.

So this gets complicated to deal with. What could be done: Use the update-plugin event hook to always make a new HTTP request (i.e. to /external_plugin/update_plugin_XXX), the plugin listens to this, and then the new http request will have loaded the new plugin code. Once this is implemented, the new routine will only work for the NEXT update though, because that code will need to be in the previous plugin, not the new one.

So, hands up, who understood this? :)

TImbalu, maybe also add a plugin option "recheck/redownload current CKEditor files"? Then people don't need to reinstall, but can use that button if the solution above fails...

Regards,
Garvin

Re: new WYSIWYG-Editor event Plugin: CKEDITOR!

Posted: Fri Dec 06, 2013 1:49 pm
by Timbalu
Two brilliant ideas :!:
That is exact the experience I had with. And that could be a solution! I did not think of bundling the update_hook with a external_plugin hook. Cool! I raise my hand... ;-)
I'll see what I can do about it.

Mange tak!

Re: new WYSIWYG-Editor event Plugin: CKEDITOR!

Posted: Fri Dec 06, 2013 6:36 pm
by Timbalu
In the german forum we just had someone complaing about vanishing HTML5 audio tags. This is done by ACF. Before I can bring up an update to this, I would like to solve these upper mentioned issues with Spartacus updates.

So in short you have three possible choices until then:
  • Drop your audio code in source-view-mode only and save the entry. Do not open and save again or switch between source/wysiwyg-mode, which forces ACF to run.
  • Turn ACF off in the Plugins config, as long as the needed update did not arrive.
  • As easy as this, add some plugin handwork by yourself:
    plugins/serendipity_event_ckeditor/ckeditor/plugins/procurator/plugin.js
    In Line 102 add "audio" like this:

    Code: Select all

    if ( !tagName.match("script|mediainsert|audio|smarty") ) tagName = 'unknown';
    plugins/serendipity_event_ckeditor/cke_config.js
    in Line 43 add another protected source audio rule like this:

    Code: Select all

    // allow html5 multiline audio tags
    config.protectedSource.push( /<(audio)[^>]*>[\s\S]*?<\/audio>/img );
    
Force some hard reloads in your browser and you should be able to use audio tags without one of the first two workarounds.

Re: new WYSIWYG-Editor event Plugin: CKEDITOR!

Posted: Tue Dec 10, 2013 10:15 am
by Timbalu
Finally this is done! :D

Todays update (2.3.3) via Spartacus will fall back to config and deflate the zip file properly. (Edit: Even better take tomorrows 2.3.4, which fixes some minor issues. Or take todays 2.3.3 without deflate and test the automatic upgrade zip with tomorrows version.)

:arrow: For the most of you out there, this will certainly happen on next future (zip) update though, since it needs to find an already prepared previous version (like Garvin described) to process the right fallback procedure.

Since I added the audio protected Source and the new config option, to deflate the zip on demand, you can do a demanded deflate until then, in case your update did not fall back to config automatically and did not announce itself as deflated. Please read the ChangeLog.

Do not forget: Like all heavy javascript based widgets, some browsers do need some hard reloads to take the new files into cache.

Re: new WYSIWYG-Editor event Plugin: CKEDITOR!

Posted: Thu Dec 12, 2013 4:43 pm
by Timbalu
I just pushed another fix to gitHub, available as version 2.3.5 tomorrow by Spartacus.

This has one real important change, beside some other small fixes (read ChangeLog).
:arrow: Instead of enabling KCFINDER integration by default, this is now set as disabled by default.
If you still want to use it, just enable it in serendipity_event_ckeditor plugins config. I did this, since I found some compat server constraints notes on kcfinder homepage, which need the users to decide to enable or not. Though you still would have the MediaLibrary popup to work as ever.

:idea: Beside this, the new config option enables us to make this plugin more configurable to our choices and keep certain options shut down, if future compat issues with CKEDITOR or Browsers arise.

:!: There is one other related NOTE: setcookie() for Chrome Browser does not work with KCFINDER for domain "localhost" and other dotless domain names on local servers. I fixed the setcookie() problem, but Chrome still has some follow-up errors, not easy to solve. Please do not use KCFINDER with Chrome on such lokal server environments, since I do not really want to touch kcfinder for this matter.

I hope this will be the last bugfix release for now, before the next major version including new CKEditor 4.3.x Widget Series will come up.

Happy Xmas time!

Re: new WYSIWYG-Editor event Plugin: CKEDITOR!

Posted: Mon Feb 10, 2014 6:56 am
by Timbalu
serendipity_event_ckeditor v. 3.2.0 released:
  • Upgrade to major CKEDITOR 4.3 Widget Series update 2
  • Added new cheatsheet plugin (keyboard and accessibility shortcuts)
  • Fixed MediaLibrary insert code to be left untouched by ACF
  • Better workflow between nuggets and entry textareas
  • Reverted internal audio procurator protection
  • Added nl2br config note
Have fun!

PS. Do not forget to force a hard reload in your browser on first edit mode!

Edit: I am sorry, it seems the new widget 4.3.x series did change some internal handler for protection, thus the mediainsert block does not survive switching WYSIWYG-mode again. Solution, do not touch old entries and/or save them immediately in source view mode, when inserting the mediainsert code.

Re: new WYSIWYG-Editor event Plugin: CKEDITOR!

Posted: Tue Feb 11, 2014 8:05 pm
by Timbalu
Tomorrow on Spartacus - bugfix version 3.2.1:
  • "Fixed" MediaLibrary img tag code implementation in case of responsive templates
    (see http://board.s9y.org/viewtopic.php?f=11&t=19738)
  • Fixed ACF still touching img code parts; when OFF
  • Fixed procurator placeholder plugin, since CKE core 4.3.2 broke prior behaviour with mediainsert code parts

Re: new WYSIWYG-Editor event Plugin: CKEDITOR!

Posted: Wed May 28, 2014 8:23 pm
by Timbalu
Tomorrow on Spartacus - serendipity_event_ckeditor v. 4.1.0 released:
  • Upgrade to major CKEDITOR 4.4 Widget Series update 1
  • Reviewed protectedSource and now also allows WP-like [[mytag]] tags in cke_config.js
  • Enhance extraAllowedContent tags in cke_config.js
  • Media Library added images are now styled/viewable in wysiwyg-mode by their Serendipity image float CSS classes, by including a new file: wysiwyg-style.css.
Have fun!

As always: Do not forget to force a hard reload in your browser when checking your first entry after upgrade!

Re: new WYSIWYG-Editor event Plugin: CKEDITOR!

Posted: Tue Jul 15, 2014 7:39 pm
by Timbalu
Tomorrow on Spartacus - serendipity_event_ckeditor v. 4.3.0 released:
Prior in 4.2.0:
  • Update to CKEDITOR 4.4 Series, update 2 (http://ckeditor.com/node/136508)
  • Plugin procurator update to support imageselectorplus quickblog hook.
  • Changed the procurator placeholder image.
  • Changed image url of Serendipity hooked-to-toolbar plugins
    (linktrimmer, amazonchooser), while these have been updated.
Check the [?] (version) button to avoid using an old cached package!

Re: new WYSIWYG-Editor event Plugin: CKEDITOR!

Posted: Mon Sep 08, 2014 10:12 am
by Timbalu
Update to CKEDITOR 4.4 Series, update 4 (http://ckeditor.com/release/CKEditor-4.4.4)
This plugin version
  • Improved some css and configuration and lang files
  • Completely remove(d/s) the KCfinder package, due to strong security concerns.
    For Upgraders: This update will remove the package completely from file tree.
    If that does not happen automatically, please purge the kcfinder directory by hand!
    This does not touch the previously used MediaLibrary KCfinder /uploads/images directory.
  • Update pbckcode plugin to v.1.2.3, which among others now fetches ACE via a CDN!
    See PBCKCODE (PRETTIFY) configuration in cke_config.js.

Re: new WYSIWYG-Editor event Plugin: CKEDITOR!

Posted: Wed Oct 15, 2014 1:12 pm
by Timbalu
Update to CKEDITOR 4.4 Series, update 5

Major change of this plugins version 4.5.1:
  • The delivered zip is a full ckeditor release package now, including some manually added additional plugins. You can now set pre-defined toolbars (Basic, Standard, Full) by option.
  • The pbckcode plugin with prettify was replaced by codesnippet, using highlight.js. A compat prettify option for old entries was added as an option for upgraders.
  • Fixes to work well with current S9y-2.0-beta5.