new WYSIWYG-Editor event Plugin: CKEDITOR!

Creating and modifying plugins.
User avatar
Dergln
Regular
Posts: 54
Joined: Thu Jun 23, 2011 8:18 pm
Location: Hessen
Contact:

Re: new WYSIWYG-Editor event Plugin: CKEDITOR!

Post by Dergln » Wed Oct 15, 2014 8:22 pm

Hi,

thanks for keeping this up to date.

I really love the UI way of configuring it instead of using the config file itself via FTP ;)

Fyi:

Code: Select all

uncaught exception: [CKEDITOR.resourceManager.load] Resource name "mediaembed" was not found at "http://.........../plugins/serendipity_event_ckeditor/ckeditor/plugins/mediaembed/plugin.js?t=D5AC".
after updating from the latest version. Deflating, via plugin-integrated command, fixed it though !

[edit]2.0 beta5[/edit]

[edit2]
Completely remove(d/s) the KCfinder package, due to strong security concerns.
Couldn't find any details on that, what was it you stumbled upon ?
[/edit2]

Greetings
Oliver

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 Oct 16, 2014 10:39 am

Thanks.
Dergln wrote:after updating from the latest version. Deflating, via plugin-integrated command, fixed it though !
Hm. Never had that or being able to reproduce this. I think it must have been a local hickup or something, since the zip contains this plugin and it hasn't changed on upgrade and lastly you were able to deflate it successfully.

About KCfinder, ... Well, lets say: I discovered some flaws which I did not want to have opened. If you really need more information send me a PM.
Regards,
Ian

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

User avatar
Dergln
Regular
Posts: 54
Joined: Thu Jun 23, 2011 8:18 pm
Location: Hessen
Contact:

Re: new WYSIWYG-Editor event Plugin: CKEDITOR!

Post by Dergln » Thu Oct 16, 2014 3:18 pm

Timbalu wrote:About KCfinder, ... Well, lets say: I discovered some flaws which I did not want to have opened. If you really need more information send me a PM.
Oh, okay.

That's totally fine by me then, I am not into security so I don't have a problem with visually appealing products not being used when people say its broken in terms of security.

I'm rather happy that people like you take the time and analyze this while/after implementing things like this. So thx again ;)

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

Re: new WYSIWYG-Editor event Plugin: CKEDITOR!

Post by Czorneboh » Wed Oct 22, 2014 8:23 pm

Hi all together!
Hi Ian!

Now I have installed CKEditor, version 4.5.1.
I want to give you feedback.
I use s9y 1.7.8 on php 5.3.3.7 +squeeze xx (do not know what that "squeeze" does mean)

I was using Chrome when installing it having not in my mind, that one should not use Chrome browser for using CKEditor. That hint in this thread I have found after installation. I have seen the installation hints.

The 2 points beneath the yellow (or ochre) marked text are fullfilled. The plugin is the 2nd last in the plugin list. The last is the extended properties plugin.

yellow marked text says: deactivate body, extended and nugget parsing global in NL2BR plugin or/and entry via entryproperties.plugin and / or for static pages.

NL2BR is not in my plugin list.

I prooved, if the wysiwyg-editor is visible. No, it is not. Now in the article writing scope there is no more editor active.

I changed to IE 11. There it looks the same.
But in that IE 11 I opened a static page draft and here the editor is visible. It looks fine here.
In Chrome as well: in static pages CKEditor is visible.

I checked this Thread and recognized reported problems with Chrome and IE.
I will yet check with FF and Opera.

In the entryproperties-plugin I did not found the place, where I can switch off the parsing, as told in the installation hint.
Which of the settings of this plugin do you need to know?
Activated is "deactivate formatting plugins for this entry".

One of my installed plugins is "serendipity_event_xhtmlcleanup".
Perhaps this has an influence?
If you hold that as possible, I will next tell you my settings of that or I can deactivate it yet.

Kind regards
Czorneboh

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 Oct 23, 2014 10:38 am

This is tested in all Browsers I can reach (Firefox, Chrome, IE) and works fine with current 2.0 beta5 checkouts and the Serendipity 1.7 Series. Ever noted any Chrome issues in changelog or this thread were fixed or removed. And I never noted to not use Chrome browser for using CKEditor in general.
Czorneboh wrote:The 2 points beneath the yellow (or ochre) marked text are fullfilled. The plugin is the 2nd last in the plugin list. The last is the extended properties plugin.
And the wysiwyg option in "Eigene Einstellungen" is activated. else you would not have the cke in staticpages, I assume.
Czorneboh wrote:yellow marked text says: deactivate body, extended and nugget parsing global in NL2BR plugin or/and entry via entryproperties.plugin and / or for static pages.

NL2BR is not in my plugin list.

In the entryproperties-plugin I did not found the place, where I can switch off the parsing, as told in the installation hint.
Well, if the nl2br is not istalled and activated, it will for sure not be in the entryform entryproperties select list: "Formatierungs-PlugIns für diesen Eintrag deaktivieren", or needs to be de-formated in staticpages.
Czorneboh wrote:One of my installed plugins is "serendipity_event_xhtmlcleanup".
Perhaps this has an influence?
If you hold that as possible, I will next tell you my settings of that or I can deactivate it yet.
I myself don't use it. But no, I don't think that it may stop ckeditor to open up in entryforms. About other influences for text parsing you will have to see yourself.
Czorneboh wrote:I use s9y 1.7.8 on php 5.3.3.7 +squeeze xx (do not know what that "squeeze" does mean)
This is Debian. Debian takes packages from php.net until the version development, here named squeeze, got freezed. Behind this date it sticks to this version - like in this case 5.3.3 - then the squeeze revision .7, but all further security and other package fixes go to the next cipher(s) https://packages.debian.org/search?keywords=php5 So this is a kind of versioning.

Now, back to the issue:
Czorneboh wrote:I prooved, if the wysiwyg-editor is visible. No, it is not. Now in the article writing scope there is no more editor active.
All Browsers mentioned have a development tool on board called by keyboard F12. In there you can check the Console/Konsole, which informs about net, css, javascript and or other issues on page loads.
Now, open up the console and reload you entryforms backend page. Then you should see any errors preventing cke to show up.

I expect it is another plugin, like autosave, or something else, which produces an error and halts the follow up loads. The autosave plugin is known for a long time to not work with any WYSIWYG-Editors, producing js errors, halting the system.
Regards,
Ian

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

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

Re: new WYSIWYG-Editor event Plugin: CKEDITOR!

Post by Czorneboh » Thu Oct 23, 2014 3:11 pm

Hi
problem solved :D
Yes, I have installed the autosave plugin.
But before I deactivated it, I opened Firebug as you described.
In sections "scripts" I found almost at the begin this:
The CKEditor installation path could not be automatically detected. Please set the global variable "CKEDITOR_BASEPATH" before creating editor instances.
Might be you would find some more useful information here within more than 1000 lines.

In Opera I opend as well console.
Here I find the comments of plugin-coders, among them acc. to autosave plugin. There are usefull infos. Xinha and TinyMCE are named already, but CKE not yet.

Now I have deactivated autosave plugin - and now editor appears in entry form backend page.

Thank you!

What I yesterday recognized yet, was, that on the static page form there is no more the blocked form field for one entry (2nd entry field on the page), which I had before (Don was telling about it last year and I wrote about it in the thread about static pages plugin, that this problem still exists for me, as you told that it was fixed already by you. It was already told, so far I remember (without looking back), that this might have been (or is) a problem connected with Xinha (in combination with Kinetic?!)

I am curious now, how CKEditor works :)

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 Oct 23, 2014 3:53 pm

Czorneboh wrote:In Opera I opend as well console.
Here I find the comments of plugin-coders, among them acc. to autosave plugin. There are usefull infos. Xinha and TinyMCE are named already, but CKE not yet.
I don't get what you mean. Maybe this: https://github.com/s9y/additional_plugi ... README.txt ?

The Serendipity autosave plugin is old and quite unmaintained. It has not really been touched for long years. It is set deprecated, since we know about the issues with WYSIWYG-Editors for long and the upcoming Serendipity 2.0 will have its own autosave in core.

These issues were marked in the forum. This at least catches some of them:
http://board.s9y.org/search.php?keyword ... bmit=Suche
Czorneboh wrote:...this might have been (or is) a problem connected with Xinha (in combination with Kinetic?!)
Yes, the staticpage collapsible box issue was related to Xinha only.
Regards,
Ian

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

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

Re: new WYSIWYG-Editor event Plugin: CKEDITOR!

Post by yellowled » Tue Oct 28, 2014 8:36 pm

Using CKEditor 4.5.1 in s9y 1.7.8 environment, I get

Code: Select all

Uncaught ReferenceError: s9ypluginbuttons is not defined serendipity_admin.php?serendipity[adminModule]=entries&serendipity[adminAction]=new:327
Uncaught ReferenceError: s9ypluginbuttons is not defined serendipity_admin.php?serendipity[adminModule]=entries&serendipity[adminAction]=new:332
Failed to load resource: the server responded with a status of 403 (Forbidden) http://domain.tld/serendipity_define.js.php
CKE settings:

Code: Select all

Allow code toolbar button? No
Allow additional prettify css/js in frontend? No
Disable Advanced-Content-Filter (ACF)? No
… and the rest should be whatever.

I'll assume that the first 2 lines are somewhat related to plugin JS in CKE, but what about the 403? The serendipity_define.js.php on that server is 644, that should be readable, shouldn't it?

(Kind of in a hurry here, this should work next Tuesday at the latest …)

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

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 Oct 28, 2014 9:06 pm

Hm strange! The file serendipity_define.js.php should not have anything to do with it.

Mine is working well (FF & Chrome), even without any s9ypluginbuttons in pluginlist, like you have I assume.
You did (hard) reload the page?

The var s9ypluginbuttons is defined and pushed for hooked plugins in cke_plugins.js, which calls the cke_config.js, where the var is used for the toolbar creations.
Please check the entry forms source code to find a working reference to cke_plugins.js. Maybe you have a path problem...?
Regards,
Ian

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

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

Re: new WYSIWYG-Editor event Plugin: CKEDITOR!

Post by yellowled » Tue Oct 28, 2014 9:21 pm

Timbalu wrote:Mine is working well (FF & Chrome), even without any s9ypluginbuttons in pluginlist, like you have I assume.
I assume I don't since I have to admit I don't even know what those are. (This is one of those lovely projects which has been set up a long time ago and is now finally being used.)
Timbalu wrote:You did (hard) reload the page?
I did not, and that “solved” it. I still get the 403 on serendipity_define.js.php, though. But CKE shows up and works after the hard reload. Thanks for the reminder. :)

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

User avatar
Dergln
Regular
Posts: 54
Joined: Thu Jun 23, 2011 8:18 pm
Location: Hessen
Contact:

Re: new WYSIWYG-Editor event Plugin: CKEDITOR!

Post by Dergln » Fri Oct 31, 2014 6:03 pm

After playing with the lightbox plugin I decided to go searching for another file manager plugin for ckeditor.

And guess what...there's an actively developed jquery version with MIT license !

I followed what little things there ought to be to do to get it working, but I only end up with my main page being loaded in the file manager popup.

If this one doesn't have security issues like KCFinder we really might have a great solution at hand here !

Examples and code can be found here:
> http://www.schnatterente.net/webdesign/ ... oad-plugin
> https://github.com/simogeo/Filemanager
Attachments
test.PNG
test.PNG (31.27 KiB) Viewed 6782 times

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 Nov 05, 2014 11:56 am

Dergln wrote:...there's an actively developed jquery version with MIT license !
Good catch, thanks!
Dergln wrote:I followed what little things there ought to be to do to get it working, but I only end up with my main page being loaded in the file manager popup.

If this one doesn't have security issues like KCFinder we really might have a great solution at hand here !
Is this a question? (I can't really help on this without any tries by myself - but..., see below)

Since I did have these security concerns embedding KCF, I decided to stick to the secured MediaLibrary popup, which is focussed to the needs and specialities of Serendipity. Any other embedded addition, allowing form interactions between client/server relations, is by default accessible by frontend users and opens possible flaws needing to get fixed. Just remember we once had this very badly with the examples open forms in the Xinha Editor, which opened a hack into the blog. I'd like to not have even the possibility again. And embedding a file manager plugin to CKE does not add any benefit to S9y forms, without having another popup design. And this will change in upcoming 2.0.
Regards,
Ian

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

User avatar
Dergln
Regular
Posts: 54
Joined: Thu Jun 23, 2011 8:18 pm
Location: Hessen
Contact:

Re: new WYSIWYG-Editor event Plugin: CKEDITOR!

Post by Dergln » Mon Nov 17, 2014 10:01 pm

Timbalu wrote:Is this a question?
Something...in the middle?

Took me a while to find time for this again but I did, and in the end it was rather simple.

Code: Select all

RewriteEngine off
in the filemanager plugin directory.

I was expecting it to do more though. Quite a few things lacking in comparison with KCfinder, e.g. Drag'n'Drop. It's basically the default MediaLibrary with auto-collapsing directories :lol:
Timbalu wrote:Any other embedded addition, allowing form interactions between client/server relations, is by default accessible by frontend users and opens possible flaws needing to get fixed. Just remember we once had this very badly with the examples open forms in the Xinha Editor, which opened a hack into the blog.
Must have been before my time with s9y. (Though, to be honest, I got rid off Xinha real fast.)
I understand the need for secure code of course.

It just now came to my attention that you reworked the MediaLibrary.
I'll play with it a bit once I got it working and see how far it can take me.

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

Re: new WYSIWYG-Editor event Plugin: CKEDITOR!

Post by Czorneboh » Wed Nov 19, 2014 3:11 pm

First experiences with recently installed CKEDITOR
(maybe opening a new forum thread for it?)

Opening new entry, write something: Saving it is not possible.

Although I have given the entry underlines and some letters or words in entry and extended entry, it does not save the entry.

In a window it says:

"It is not allowed to publish an entry without entry body. Please enter text into the entry body and save again!"

This happened a couple of days ago (do not remember in which browser) and today again FF. I guess, it must be because of a browser plugin blocking something. But I had allowed in Noscript js for my website.

Or perhaps I have to write text as well into other fields from other plugin? Like Meta-keywords and Meta-description?

Ah, I remember, that a couple of days ago I copied the text particles into another browser, where I opened new entry, pasted it there and could save the draft then.

Noscript do not shows me, that it still blocks something. But there are other browser plugins for privacy in use.

What else than activated javascript do I need to be able to use CKEDITOR?

I think, I need to check this with browsers without relevant (blocker-) plugins.
But using Xinha I had not this issue.

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 Nov 19, 2014 3:43 pm

Czorneboh wrote:What else than activated javascript do I need to be able to use CKEDITOR?
Serendipity ;-) in version 1.7.x or a current 2.0-beta6 snapshot.

The S9y Save Button is working, even the save button of the ckeditor toolbar. For staticpages the latter does not work and is disabled in upcoming 2.0 staticpages!

Maybe you just try to sort out all issues you think this could depend to, then open a new thread, maybe even in your language and there will be help, if anybody can imagine what you have installed and tried to do. Else this is guesswork!

In this Plugin lang file, you will find the message note you get:
https://github.com/s9y/additional_plugi ... en.inc.php

Perhaps you just start to disable this plugin for a while, to see if this is the cause of your issues?! (Which I am quite sure is the root of all evil. ;-) )
Regards,
Ian

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

Post Reply