Author Topic: Can anyone upgrade CKeditor?  (Read 112869 times)

instantflorian

  • Guest
Re: Can anyone upgrade CKeditor?
« Reply #175 on: September 18, 2014, 10:04:06 AM »
Can't confirm. Which Chrome version, which OS, which WB version?

Offline ruebenwurzel

  • Betatester
  • **
  • Posts: 8391
  • Gender: Male
  • Keep on Rockin
    • Familie Gallas Online
Re: Can anyone upgrade CKeditor?
« Reply #176 on: September 22, 2014, 06:39:34 AM »
Hello,

it seems that the latest ckeditor modul uses editor.css only from the standard template. If you use another template for special sites the editor.css of this template isn't loaded.

I think it would be better not to look if the standardtemplate (set in options) has a editor.css, it should be looked if the template from the page wich is edited has a editor.css.

Regards
Matthias

Offline jacobi22

  • Posts: 5872
  • Gender: Male
  • Support also via PM or EMail
    • Jacobi22
Re: Can anyone upgrade CKeditor?
« Reply #177 on: September 22, 2014, 01:29:08 PM »
Quote
it seems that the latest ckeditor modul uses editor.css only from the standard template.

works for me without problems with every template
Wer nicht will, findet Gründe, wer will, findet Wege.

Offline niekfox

  • Posts: 85
Re: Can anyone upgrade CKeditor?
« Reply #178 on: September 26, 2014, 03:47:11 PM »

 Sorry, its in the template of the page, i must Reload the page, and then it comes !
 (not at the first load)

 But now that i know that, i can live with it.

 Thank you !
 

Offline dbs

  • Betatester
  • **
  • Posts: 8027
  • Gender: Male
  • tioz4ever
    • WebsiteBaker - jQuery-Plugins - Module - Droplets - Tests
Re: Can anyone upgrade CKeditor?
« Reply #179 on: September 28, 2014, 09:15:46 AM »
Hi, the image-dialog -> tab "Link" could provide something more as only URL and target.
Would be nice if there is a field "Relation" (for Popups). Maybe a field "Class" is also a good idea.

In FCK this was a good feature, but the FCK is old crap. :)

Is it possible? Or is it to much work and the user should use the normal Link-menu-button?

Offline dbs

  • Betatester
  • **
  • Posts: 8027
  • Gender: Male
  • tioz4ever
    • WebsiteBaker - jQuery-Plugins - Module - Droplets - Tests
Re: Can anyone upgrade CKeditor?
« Reply #180 on: September 28, 2014, 11:30:19 AM »
Other question.
I have made a template for inserting image with caption, incl. link around.
Image and link have pathes to existing dummy-files in href and src.

Right-click on the image shows the image-dialog with filled pathes to the dummy-files. This is ok and right.

But double-click on the image shows the image-dialog without filled pathes.
if the user now choose a image in the image-tab, in the same moment the link-tag will be removed. In sourcecode only the image-tag is there.
Can somebody confirm this?

CK 4.3.3, WB 283 SP1, PHP 5.4, FF 32.0.3

Offline sky writer

  • Posts: 926
Re: Can anyone upgrade CKeditor?
« Reply #181 on: January 10, 2015, 06:06:45 PM »
Excellent work on this module.  Thank you!

I am trying to accomplish two things.
1. change the DEFAULT (starting) width of the CKEditor editor window.
2. allow resizing of the CKEditor editor window.

CMS Version 2.8.3 SP3 Revision 1640
Admin version 1.6
CKEditor 4.4.3
Argos Theme 1.7.0

I have the CKEditor editor files copied to my "_yourwbinstallation _/templates/_yourdefaulttemplate_/editor/"
editor.css
editor.styles.js
editor.templates.js
readme-faq.txt
wb_ckconfig.js

In "wb_ckconfig.js", I have made the suggested (CKEditor Docs) changes to:
Code: [Select]
    // The standard height and width of CKEditor in pixels.
    config.height           = '250';
//    config.width            = '900';
    config.width            = '1200';
    config.toolbarLocation  = 'top';

    // Define possibilities of automatic resizing in pixels. Set config.resize_enabled to false to
    // deactivate resizing.
    config.resize_enabled   = true;
    config.resize_minWidth  = 500;
    config.resize_maxWidth  = 1500;
    config.resize_minHeight = 200;
    config.resize_maxHeight = 1200;
//    config.resize_dir = 'vertical';
    config.resize_dir = 'both';

None of the width settings take effect.  The only way I can find to change the (starting) width from 900 to 1200px is to change the table width in the header.htt file in the Argos Theme 1.7.0.

config.resize_dir = 'both'; does not seem to stick.  If I open WYSIWYG admin page, and look at the source code, it always shows:
Code: [Select]
<script type="text/javascript">//<![CDATA[
CKEDITOR.replace('content26',
 {"ModulVersion":"4.4.3","format_tags":"p;div;h1;h2;h3;h4;h5;h6;pre;address","skin":"moono","language":"en","defaultLanguage":"en","resize_dir":"vertical","autoParagraph":true,"contentsCss": ..... "browserContextMenuOnCtrl":true,"scayt_sLang":"en_US","scayt_autoStartup":false,"height":"350","width":"100%"});
//]]></script>
...and ""resize_dir":"vertical"" is always set to "vertical".  Has this been hard coded into the CKEditor 4.4.3?  Or am I missing how to accomplish this properly?

I can make other changes in the wb_ckconfig.js, and they take effect without issue. (e.g. toolbars)

Any help would be greatly appreciated.

Offline jacobi22

  • Posts: 5872
  • Gender: Male
  • Support also via PM or EMail
    • Jacobi22
Re: Can anyone upgrade CKeditor?
« Reply #182 on: January 10, 2015, 06:36:55 PM »
Quote
None of the width settings take effect.  The only way I can find to change the (starting) width from 900 to 1200px is to change the table width in the header.htt file in the Argos Theme 1.7.0.
the values in the config-file (ckeditor/include.php) are standard values, the most modules gives own values for width & height, like wysiwyg-module in modules/wysiwyg/modify.php

Code: [Select]
show_wysiwyg_editor('content'.$section_id,'content'.$section_id,$content,'100%','350');
Quote
and ""resize_dir":"vertical"" is always set to "vertical".

is it "hardcodet" to "vertical" in the include.php from the ckeditor, possible values: both, vertical, horizontal,
feel free to change the value there
if you dont have a setting in this include-file, you can set the resize_dir in a wb_ckconfig.js in your frontend-template or in the ckeditor-module-folder like modules/ckeditor/wb_ckconfig/wb_ckconfig.js

Quote
I can make other changes in the wb_ckconfig.js, and they take effect without issue. (e.g. toolbars)
see example from dbs or take a look to page 6 here in this thread
for other custom config settings see the path's in ckeditor/include.php
http://www.WebsiteBaker.org/forum/index.php/topic,25334.msg189229.html#msg189229
« Last Edit: January 10, 2015, 06:44:06 PM by jacobi22 »
Wer nicht will, findet Gründe, wer will, findet Wege.

Offline sky writer

  • Posts: 926
Re: Can anyone upgrade CKeditor?
« Reply #183 on: January 12, 2015, 05:10:17 AM »
I must be confused.  I thought the idea with moving the config files (e.g. wb_ckconfig.js) to my template folder was so I can make changes there INSTEAD of the source module files, since the module files will be overwritten if you update/upgrade.

I have made the change from "vertical" to "both" in the module "include.php" file and it works, thanks.  I guess I'll just have to remember to make the change each time I update CKEditor in the future.

Offline jacobi22

  • Posts: 5872
  • Gender: Male
  • Support also via PM or EMail
    • Jacobi22
Re: Can anyone upgrade CKeditor?
« Reply #184 on: January 12, 2015, 01:09:00 PM »
I must be confused.  I thought the idea with moving the config files (e.g. wb_ckconfig.js) to my template folder was so I can make changes there INSTEAD of the source module files, since the module files will be overwritten if you update/upgrade.

"problem" is the order in the ckeditor-include-file.
take a look into this file to understand - nearly in the top of this file you found some basic settings like (only 3 for example)
- $ckeditor->config['skin'] = 'moonocolor';
- $ckeditor->config['format_tags'] = 'p;div;h1;h2;h3;h4;h5;h6;pre;address';
- $ckeditor->config['resize_dir'] = 'vertical';

after this basic settings comes the path to the config files.
if WB calls the editor, it starts to load the settings in the top of the include, after that, it looks into the custom config files, but it is too late, to load the settings for this values again
there are only two ways to change the config from this point
way 1: load the custom config files before set standard values (like older ckeditor versions)
way 2: load custom values in the function call, but then you have to change the function (same problem with overwrite in upgrade)

i'll show way 1 for you  and i'll talk with marmot - maybe its possible to change the order in the include-file

solution is testet and works - after that, you can set your custom settings in your individual config-files like wb_ckconfig.js in template folder

look at the begin from the ckeditor / include.php for the standard settings like this

Code: [Select]
/**
         * A list of semi colon separated style names (by default tags) representing
         * the style definition for each entry to be displayed in the Format combo in
         * the toolbar. Each entry must have its relative definition configuration in a
         * setting named "format_(tagName)". For example, the "p" entry has its
         * definition taken from config.format_p.
         * @type String
         * @default 'p;h1;h2;h3;h4;h5;h6;pre;address;div'
         */
        $ckeditor->config['format_tags'] = 'p;div;h1;h2;h3;h4;h5;h6;pre;address';

        //$ckeditor->textareaAttributes = array( "rows" => 8, "cols" => 80 );

        /**
         *        If you also want to look for the template-specific css, you can simple add the files like below.
         *        Just uncomment one or both of the following two lines ;-) by removing the double-slashes ...
         *
         */
        //        $files['contentsCss'][]= '/template.css';
        //        $files['contentsCss'][]= '/css/template.css';

        /*
        * The skin to load. It may be the name of the skin folder inside the editor installation path,
        * or the name and the path separated by a comma.
        * Available skins: moono, moonocolor
        */
        $ckeditor->config['skin'] = 'moonocolor';
       // $ckeditor->config['contentsLangDirection'] = 'rtl';

        /**
         *        Setup the CKE language
         *
         */
        $ckeditor->config['language'] = strtolower(LANGUAGE);

  // The language to be used if config.language is empty and it's not possible to localize the editor to the user language.
        // $ckeditor->config['defaultLanguage']  = strtolower(DEFAULT_LANGUAGE);
  $ckeditor->config['defaultLanguage']  = 'en';

        $ckeditor->config['resize_dir'] = 'vertical';

cut off this lines and paste it nearly to the end, but before this lines

must stay at the last lines in the include.php
Code: [Select]
$ckeditor->reverse_htmlentities($content);

        echo $ckeditor->to_HTML( $name, $content, $ckeditor->config);
}
Wer nicht will, findet Gründe, wer will, findet Wege.

Offline sky writer

  • Posts: 926
Re: Can anyone upgrade CKeditor?
« Reply #185 on: January 12, 2015, 04:29:14 PM »
Thank you very much for the explanation.  It's all crystal clear to me now.

For my purposes, I will not bother to implement your Solution 1 (although I appreciate your efforts), as the ['resize_dir'] = 'vertical'; setting is the only one which I need changed, and it's easier to just change it in the included.php, rather than moving code around.  And as we know, either method will require a redo, after an upgrade.

I wonder why these settings are set in the include.php:
- $ckeditor->config['skin'] = 'moonocolor';
- $ckeditor->config['format_tags'] = 'p;div;h1;h2;h3;h4;h5;h6;pre;address';
- $ckeditor->config['resize_dir'] = 'vertical';

I realize you need to have some defaults set, but can't they just be set in the wb_ckconfig.js, which is called by the include.php?  This would mean everything that NEEDS to be set is, for those who don't want to get into the code to customize, but for those who do want more control, they just have to make changes in their template folder copy of wb_ckconfig.js.  And then those custom settings will not be lost with a module upgrade.

Again, I am not trained, so there is probably a good reason for this.  I am just curious.

Offline jacobi22

  • Posts: 5872
  • Gender: Male
  • Support also via PM or EMail
    • Jacobi22
Re: Can anyone upgrade CKeditor?
« Reply #186 on: January 12, 2015, 05:03:30 PM »
and it's easier to just change it in the included.php, rather than moving code around.  And as we know, either method will require a redo, after an upgrade.

another methode without moving code

set two slashes at the begin from this line in the ckeditor / include.php  like this to comment it out
Code: [Select]
//$ckeditor->config['resize_dir'] = 'vertical';
and define it in your custom config files in the template folder like
Code: [Select]
$ckeditor->config['resize_dir'] = 'both';
then you have a working solution - also when the include.php changed in the next upgrade
Wer nicht will, findet Gründe, wer will, findet Wege.

Offline sky writer

  • Posts: 926
Re: Can anyone upgrade CKeditor?
« Reply #187 on: January 12, 2015, 05:37:06 PM »
another methode without moving code

set two slashes at the begin from this line in the ckeditor / include.php  like this to comment it out
Code: [Select]
//$ckeditor->config['resize_dir'] = 'vertical';
and define it in your custom config files in the template folder like
Code: [Select]
$ckeditor->config['resize_dir'] = 'both';
then you have a working solution - also when the include.php changed in the next upgrade


That's what I have done.  But that is the point of my questions.  Why set these defaults at all in include.php?  Why not just let them be set by the wb_ckconfig.js file?

The resize is already set to vertical in wb_ckconfig.js:
Code: [Select]
$ckeditor->config['resize_dir'] = 'vertical';
So those who wish to, can just change that to 'both' in their template folder version of wb_ckconfig.js

Why the redundancy?  Especially when it cripples some custom setting ability of the template folder version of wb_ckconfig.js

I know I can just use these work-arounds... but I am thinking of EVERYONE moving forward, and making it more obvious how to make these changes for themselves.

Offline jacobi22

  • Posts: 5872
  • Gender: Male
  • Support also via PM or EMail
    • Jacobi22
Re: Can anyone upgrade CKeditor?
« Reply #188 on: January 12, 2015, 06:40:50 PM »
Why set these defaults at all in include.php? 

 i dont know  ;-)
maybe its a little mistake, maybe a adwise from the cke-group, i dont know  :roll:
this definitions was not there in the include.php in older module version like Vers 0.65, but in Vers 0.72

i write a PM to marmot and i hope, he can change this in the next version or explain it
Wer nicht will, findet Gründe, wer will, findet Wege.

Offline dbs

  • Betatester
  • **
  • Posts: 8027
  • Gender: Male
  • tioz4ever
    • WebsiteBaker - jQuery-Plugins - Module - Droplets - Tests
Re: Can anyone upgrade CKeditor?
« Reply #189 on: April 09, 2015, 09:27:28 AM »
it seems that the latest ckeditor modul uses editor.css only from the standard template. If you use another template for special sites the editor.css of this template isn't loaded.

I think it would be better not to look if the standardtemplate (set in options) has a editor.css, it should be looked if the template from the page wich is edited has a editor.css.

Can confirm this with cke 4.4.3
Now i could also need a solution for this.

Offline dbs

  • Betatester
  • **
  • Posts: 8027
  • Gender: Male
  • tioz4ever
    • WebsiteBaker - jQuery-Plugins - Module - Droplets - Tests
Re: Can anyone upgrade CKeditor?
« Reply #190 on: April 10, 2015, 12:32:55 PM »
A little angel named Dietmar has found a solution.
Works in my test with ckeditor 4.4.3

Replace in modules/ckeditor the attached include.php (rename to include.php)

Offline sky writer

  • Posts: 926
Re: Can anyone upgrade CKeditor?
« Reply #191 on: April 10, 2015, 03:59:26 PM »
Does this update fix the issue I brought up?

Offline dbs

  • Betatester
  • **
  • Posts: 8027
  • Gender: Male
  • tioz4ever
    • WebsiteBaker - jQuery-Plugins - Module - Droplets - Tests
Re: Can anyone upgrade CKeditor?
« Reply #192 on: April 10, 2015, 06:49:36 PM »
Hi, can't see a "both"-effect.
Not with change in ckeditor/wb_config/wb_ckconfig.js  and not with changes in my_template/wb_ckconfig.js
'both' or 'horizontal' are not usable.

The "vertical"-setting in include.php should be commented out. Don't know why this setting is not overwritable by wb-ckkonfig.js.

Offline Luisehahne

  • WebsiteBaker Org e.V.
  • **
  • Posts: 4368
  • Gender: Male
    • Webdesign und Entwicklung WebsiteBaker
Re: Can anyone upgrade CKeditor?
« Reply #193 on: April 10, 2015, 06:58:21 PM »
Hi,

because the ckeditor php class create a json with the parameter settings from the include.php. This overwrites the settings in the wb_config.js and not wb_config.js overwrite the settings in include.php.

And if you comment out some settings in the include.php, this settings will be set by wb_config.js

Dietmar

Immer nur von der Zukunft reden, die Gegenwart vergessen und auf die Vergangenheit schimpfen
Neues Unwort: Schnappatmung

Offline Yetiie

  • Posts: 778
Re: Can anyone upgrade CKeditor?
« Reply #194 on: April 16, 2015, 03:39:27 PM »
Just as suggestion:

Font Awesome becomes more and more popular.
Not only for Bootstrap but other projects with other frameworks too.

One Problem to use this Icons is, that the editor cannot add them easily to the page.
And I recognize: in normal mode the CKEditor removes the standard symbol html code (empty <i>-Tags) from the code.


Today I found following module for CKEditor:
http://ckeditor.com/addon/fontawesome

The Idea: Symbols at the fingertips of the editors.
Not only for bootstrap projects !!!!
A little modul-addon could improve the usabilities of the whole wb a lot :-)


Has somenone experience with this module or uses it?
What do you think about to ad this to the wb version for the editor?

Offline Luisehahne

  • WebsiteBaker Org e.V.
  • **
  • Posts: 4368
  • Gender: Male
    • Webdesign und Entwicklung WebsiteBaker
Re: Can anyone upgrade CKeditor?
« Reply #195 on: September 08, 2015, 06:20:44 PM »
New CKEditor Version 4.5.3, Pls download and test.

http://addon.WebsiteBaker-next.de/pages/en/browse-add-ons.php?id=08A769F

Dietmar

Immer nur von der Zukunft reden, die Gegenwart vergessen und auf die Vergangenheit schimpfen
Neues Unwort: Schnappatmung

Offline Hans

  • Posts: 912
  • Gender: Male
Re: Can anyone upgrade CKeditor?
« Reply #196 on: September 09, 2015, 11:08:52 AM »
Hello Dietmar

as I wrote in private earlier, the editor works fine now for inserting images in responsive websites (with this code of course:
Code: [Select]
img {
  width: auto;
  max-width: 100%;
  height: auto;
}
)

I tested some more and until now I haven't found any issues.

This is a great leap now almost every website has to be responsive.

It would be nice if features like adding classes to an image and spaces around them could be re-implemented.
Hans - Nijmegen - The Netherlands

Offline Luisehahne

  • WebsiteBaker Org e.V.
  • **
  • Posts: 4368
  • Gender: Male
    • Webdesign und Entwicklung WebsiteBaker
Re: Can anyone upgrade CKeditor?
« Reply #197 on: September 09, 2015, 12:16:35 PM »

the image2 plugin is a ready plugin by ckeditor. I'm not happy with it. You can remove it as follows:

Line 212
Code: [Select]
<?php
remove entry image2 from $ckeditor
->config['extraPlugins'] =
to $ckeditor->config['removePlugins'] = 

Dietmar
Immer nur von der Zukunft reden, die Gegenwart vergessen und auf die Vergangenheit schimpfen
Neues Unwort: Schnappatmung

Offline hgs

  • Betatester
  • **
  • Posts: 1116
    • EFG MG
Re: Can anyone upgrade CKeditor?
« Reply #198 on: September 09, 2015, 01:43:56 PM »
Hallo zusammen

Nach dem Update finde ich die "Abstände" zum Bild nicht mehr und es wird keine "Vorschau" gezeigt.
Siehe Bilder
LG Harald

"Fange nie an, aufzuhören - höre nie auf, anzufangen." Marcus Tullius Cicero (106-43 v.Chr.)

Offline jacobi22

  • Posts: 5872
  • Gender: Male
  • Support also via PM or EMail
    • Jacobi22
Re: Can anyone upgrade CKeditor?
« Reply #199 on: September 09, 2015, 02:09:21 PM »

the image2 plugin is a ready plugin by ckeditor. I'm not happy with it.

yes, the image2-Plugin is a step back, no extra css class, no title etc. It give's a lot of trouble, if the user is using something like that in his page.

please remove it from the standard package, the "old" image-plugin works also with html5

another point: the code-plugin - the plugin-Version from the last ckeditor-version 4.4.3. or 4.4.4 works without problems, the new plugin-version shows me only a empty field with my pre-css-class without output. i see my code only in the source code in the backend. maybe something goes wrong in the ckeditor.js
i'll check this now with a new download from the ckeditor-page
Wer nicht will, findet Gründe, wer will, findet Wege.

 

postern-length