new WYSIWYG-Editor event Plugin: CKEDITOR!

Creating and modifying plugins.
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 Nov 29, 2014 1:05 pm

On Air:
  • * Upgrade to CKEDITOR 4.4 Series, update 6 (http://ckeditor.com/whatsnew)
    * Introduces Serendipity language checking corresponding CKEDITOR lang files
    * The toolbars now hide the CKE image widget to primarily support the S9y MediaLibrary.
    * Some more optimations here and there (*)
(*) Hard reload your browser by [CTRL]-[r] to avoid caching on first CKE toolbar run in a Serendipity backend textarea.

______________________________________________________________________

:!: PLEASE NOTE:
For the upcoming Serendipity 2.0-RC the core build and included CKEDITOR has the same supporting level, except some of the special config options this plugin has. If you do not need the codesnippet plugin for example, or are able to configure your own custom version, there is (currently) no need to use this plugin any further.
Regards,
Ian

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

ICE
Regular
Posts: 239
Joined: Tue Jun 28, 2005 11:15 pm

Re: new WYSIWYG-Editor event Plugin: CKEDITOR!

Post by ICE » Mon Jan 26, 2015 7:43 pm

Short Question:
Why are there two directories for ckeditor and which directory is used primary?

/htmlarea
and
/plugins/serendipity_event_ckeditor

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

Re: new WYSIWYG-Editor event Plugin: CKEDITOR!

Post by Timbalu » Mon Jan 26, 2015 7:57 pm

Are you sure you want to ask me this...? ;-)
One is the 2.0 core Editor, the other the plugin in plugins/. If you have the plugin installed and not set hidden in your pluginlist this will be used, else the default core Editor. They look pretty much the same, except the plugin has included the codesnippet editor and some others per default.
Regards,
Ian

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

ICE
Regular
Posts: 239
Joined: Tue Jun 28, 2005 11:15 pm

Re: new WYSIWYG-Editor event Plugin: CKEDITOR!

Post by ICE » Mon Jan 26, 2015 8:05 pm

Okay ........
I've looked for a way to enable the picture button in the toolbar and found it first in /htmlarea/s9y_cketoolbar.css but it doesn't worked ... Then i've altered the /plugins/serendipity_event_ckeditor/cke_backend.css and then, it worked ... but its not update persistent ...

Code: Select all

/*
  CKEDITOR Toolbar tweak to hide the cke-image widget buttons.
  Keeps image widget functionality needed for S9y-MediaLibrary inserts,
  but disables these button to eyes!
*/
htmlarea was an very very old wysiwyg editor ...

Which way do you prefer? Built-in or plugin?

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

Re: new WYSIWYG-Editor event Plugin: CKEDITOR!

Post by Timbalu » Mon Jan 26, 2015 8:16 pm

Why do you want this? Our Image Button for the Media Library is much better, since it knows the internals (eg classes etc) of Serendipity. That was one of the reasons I hid the ckeditor default button, but keeping it actually work.
ICE wrote:htmlarea was an very very old wysiswg editor ...
That(*) was before 2.0! :) It even is currently better now, since it includes a patch that fixes Serendipity search results with umlauts. This will change, say also be included for upcoming CKEDITOR plugin 4.7.0, later this week. Return back to read about it here.

*) You definitely mean the old Xinha Editor and /htmlarea is just the directory where it lived. This is nowadays (in 2.0) replaced by core CKEDITOR.
Regards,
Ian

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

ICE
Regular
Posts: 239
Joined: Tue Jun 28, 2005 11:15 pm

Re: new WYSIWYG-Editor event Plugin: CKEDITOR!

Post by ICE » Mon Jan 26, 2015 8:27 pm

A friend of mine uses Serendipity since 2006 and he has never used the media library. He has written over 14000 entries and up to then, he has insert every picture by hand with Xinha-Editor. Now he wants to do it the same way with Serendipity 2.0. I know, it is not the best way, but he prefers it ...

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 Jan 28, 2015 2:01 pm

Tomorrow on Spartacus
4.7.0:
-----
  • Upgrade to CKEDITOR 4.4 Series, update 7 (http://ckeditor.com/whatsnew)
  • Introduce new config option to re-enable the CKE built-in image toolbar button.
    This is not recommended to do, but there may be people in need.
  • MAJOR CHANGE:
    In Serendipity 2.0 development, we discovered CKEDITOR storing htmlentities
    to the database, which is ok normally, but does not work for search request results.
    We have now disabled config.entities and config.htmlEncodeOutput for the editor,
    to strictly let S9y handle this.
    The not catched search results did only happen to Umlauts or specialized chars!
    If you really are subjected to this for previous entries stored by this plugin editor,
    you will have to call and re-submit these entries again. Sorry!
Regards,
Ian

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

ICE
Regular
Posts: 239
Joined: Tue Jun 28, 2005 11:15 pm

Re: new WYSIWYG-Editor event Plugin: CKEDITOR!

Post by ICE » Wed Jan 28, 2015 4:47 pm

Timbalu wrote:
  • Introduce new config option to re-enable the CKE built-in image toolbar button. This is not recommended to do, but there may be people in need.
Thanks for that, but i think it is a special option only for my friend. I cannot imagine that anybody does it the same way. I think he does it this way, because his media library doesn't work properly due misconfiguration since 2006 (path for imagemagic was set, but his hoster doesn't support this, no name for imagethumb and no thumb-picture width was set) and no thumbs were created. He found this image-button as solution for him.
I've fixed this now and maybe he will use the media library in future...
Nevertheless, he will be very happy to see this button to re-enable this in ckeditor config options.

Thank you!

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 » Tue Feb 03, 2015 2:35 am

I do refer to (or on) my post on 19th nov. 2014 and Ians answer.
The S9y Save Button is working, even the save button of the ckeditor toolbar.
There is no such save button in the ckeditor toolbar in my blog. - I am using version 4.7.0.
In the options I use "Standard" at choose toolbar.

The last time I had deactivated cke like Ian propsed and was working as usual.
After reactivating I still have the issue, that an entry, which I am creating, I can not save.

There where some more recommendations, but first I wonder about a save button in the ckeditor toolbar.

I do remember, that there are more buttons possible than seen in the standard. How to activate that save button or to pull it into the toolbar?

Update: Aha answer to myself: After switching in plugin options to "Full" I have the save button. I typed in both entry fields and the title field and saving seemed to work. - But the new entry do not appears in the entry list, strange. :roll:


And another thing according to the toolbar: the first button for the size of title: the describing word is visible only partly. If I could pull down a group of buttons to the 2nd line, perhaps it would exceed? But I do not can grap the buttons /button group to drag them down, as like in my browser.

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 Feb 03, 2015 11:22 am

Czorneboh wrote:I do remember, that there are more buttons possible than seen in the standard. How to activate that save button or to pull it into the toolbar?
The save/submit button in the CKEDITOR toolbars is build and invented for standalone and simple WYSIWYG Editor form approaches.
If you embed this WYSIWYG editor to a framework like Serendipity, there are special needs for various fields, which do not always correspond to the button handlers using it as a standalone or simple embedded tool. One of it is saving a textareas (entry) field, another the image inclusion for example. Serendipity entry forms are much more "complicated" than a simple html form, which has included a wysiwyg editor in the textarea field. A CKE toolbar submit would have to know any case of what to send. This before.

That is why we recommend not to use the cke toolbar save/submit button, since it would only happen to work in normal blog entries (at least the last time I checked this, it did), but not in staticpage entries for example. This is, why it only is included in the (default) full toolbar, still not really recommended to use.
Czorneboh wrote:And another thing according to the toolbar: the first button for the size of title: the describing word is visible only partly. If I could pull down a group of buttons to the 2nd line, perhaps it would exceed? But I do not can grap the buttons /button group to drag them down, as like in my browser.
You mean the FORMAT select button field, don't you. It is of a certain size, meaning, has limited height and is scrollable (checked working in every browser) and a limited width. This is by design. And you see the first select "Überschrift h1" to be cut by width. (I assume this is what you are talking about.) This is because there are different languages in the world, varying by length, which force you to make UI compromises. As you easily can see what is meant in this case by reading the visible followup select fields "Überschrift h2" and "Überschrift h3" etc, there is no really need to make this select field versatile. A place change in toolbar would not have any effects. I would not recommend to change the internal styles for this.

And yes, the toolbar groups or buttons are not moveable like browser tabs. If you want to change the button or button group order you will have to learn how to do this yourself. It is partially documented in Serendipity/htmlarea/ckeditor_s9y_config.js and even how to set up a custom config file. I would not recommend to do this just because of some minor design questions, before you know what you are doing. [This only if you use the core CKEDITOR package, not the plugin we are talking about here!]
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 » Tue Feb 03, 2015 9:30 pm

Thanks for the explanation. Yes, Ian, you have interpreted me right.

I will come back later to the "not saving"-issue, probably with a new thread, as you recommended an 19th nov.

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 Feb 04, 2015 11:33 am

Czorneboh wrote:I will come back later to the "not saving"-issue, probably with a new thread
You may do this, but I can not say anything more about it: Use the Serendipity form SAVE/SUBMIT buttons only!
Regards,
Ian

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

ICE
Regular
Posts: 239
Joined: Tue Jun 28, 2005 11:15 pm

Re: new WYSIWYG-Editor event Plugin: CKEDITOR!

Post by ICE » Sun Feb 15, 2015 10:12 am

I've found a little bug within the new "Stelle den eingebauen Bildbutton ab?"-function. The new button isn't showing in Internet Explorer (Firefox and Chrome works!). In toolbar, only a blank field is displayed.

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

Re: new WYSIWYG-Editor event Plugin: CKEDITOR!

Post by Timbalu » Sun Feb 15, 2015 10:35 am

Yeah, true. The cke_ibn.css line 9 rule: visibility: initial; needs to be visibility: visible;
I'll fix that for a future release. Thanks.
Regards,
Ian

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

ICE
Regular
Posts: 239
Joined: Tue Jun 28, 2005 11:15 pm

Re: new WYSIWYG-Editor event Plugin: CKEDITOR!

Post by ICE » Mon May 04, 2015 8:38 pm

I think I have found a little css bug. If you click on sourcecode in editor on any entry, everything works fine. If you do it on a html-nugget, then the sourcecode view is only half of the textarea width.

In chrome css view, I've found this:

Code: Select all

@media only screen and (min-width: 768px)
.configuration_group .form_select select, .configuration_group .form_multiselect select, .configuration_group .form_field input, .configuration_group .form_area textarea, #uploadform .form_select select, #uploadform .form_field input {
  max-width: 48%;
}
If put max-width to 100%, the sourcecode view is fine ...

Post Reply