Ckeditor plugin - Update ckeditor

407 views
Skip to first unread message

Gael Princivalle

unread,
Feb 25, 2014, 4:48:30 PM2/25/14
to web...@googlegroups.com
Hello all.

I've tried to update the ckeditor version of the plugin without success.

Someone knows the right way to do it ?

Thanks in advance.

Tim Richardson

unread,
Feb 26, 2014, 4:07:29 PM2/26/14
to web...@googlegroups.com
Do you refer to a plugin downloaded from web2py slices? Or do you mean your own installation of ckeditor ?

Gael Princivalle

unread,
Feb 27, 2014, 6:38:51 AM2/27/14
to web...@googlegroups.com
Hi Tim, thank you for your answer.

>Do you refer to a plugin downloaded from web2py slices?

Yes. For example if if want to use a recent CKeditor plugin for media embedding I cannot do it because they are not available for versions released before 4.0.

Do you know how I can update CKeditor in the web2py plugin ?

Regards.

Tim Richardson

unread,
Mar 4, 2014, 2:19:50 PM3/4/14
to web...@googlegroups.com
I've cloned the ckeditor plugin and updated it to the latest version of ckeditor and fixed a couple of other problems. It's working for me in an app. I'll finish the plugin in a few days, I need to merge my changes back and add some testing code. I've removed the inline edit capability since it depends on JavaScript which appears to be unmaintained.

Gael Princivalle

unread,
Mar 4, 2014, 3:41:58 PM3/4/14
to web...@googlegroups.com
That's a really good news. Can you give also a little documentation for updating/changing the ckeditor version ?

Thank's a lot Tim.

Tim Richardson

unread,
Mar 4, 2014, 11:15:03 PM3/4/14
to
Have a look here:( The plugin can be found on releases; download it and then upload it via the admin app. I'll move it to web2py slices once I get some feedback and do some more testing myself)

https://github.com/timrichardson/web2py_ckeditor4/releases

Let me know if it works ok. It's the current ckeditor, standard edition. The release notes have instructions on how to update it. Unless the API to the custom browsers and uploaders changes, putting a new release in is very easy.
That API didn't change between v3 and v4 which is good news.

Gael Princivalle

unread,
Mar 23, 2014, 4:04:36 PM3/23/14
to web...@googlegroups.com
Thank you Tim.

This new version works well.

What I don't understand is how can I update the CKeditor version.
In the release notes I've saw that "To upgrade to a newer version of ckeditor, replace the directory static/plugin_ckeditor with the directory downloaded from the ckeditor site."
But when I do it quite all buttons disappear and some functions are missing.

Here is in attach file the custom version that I've download from the CKeditor website.
Can you make a test ?

Regards.
  

Il giorno mercoledì 5 marzo 2014 05:14:34 UTC+1, Tim Richardson ha scritto:
Have a look here:( The plugin can be found on releases; download it and then upload it via the admin app. I'll move it to web2py slices once I get some feedback and do some more testing myself)

https://github.com/timrichardson/web2py_ckeditor4/releases

Let me know if it works ok. It's the current ckeditor, standard edition. The release notes have instructions on how to update it. Unless the API to the custom browsers and uploaders changes, putting a new release in is very easy.
That API didn't change between v3 and v4 which is good news.



On Wednesday, 5 March 2014 07:41:58 UTC+11, Gael Princivalle wrote:
ckeditor_4.3.3_5d9747711090.zip

Tim Richardson

unread,
Mar 23, 2014, 8:11:56 PM3/23/14
to web...@googlegroups.com


On Monday, 24 March 2014 07:04:36 UTC+11, Gael Princivalle wrote:
Thank you Tim.

This new version works well.

What I don't understand is how can I update the CKeditor version.
In the release notes I've saw that "To upgrade to a newer version of ckeditor, replace the directory static/plugin_ckeditor with the directory downloaded from the ckeditor site."
But when I do it quite all buttons disappear and some functions are missing.

Here is in attach file the custom version that I've download from the CKeditor website.
Can you make a test ?
the idea is that you should extract the downloaded archive, which will put everything in directory. You rename that directory to be plugin_ckeditor, remove the existing directory with that name and replace it with the new one. This works for me.

Tim Richardson

unread,
Mar 23, 2014, 8:13:17 PM3/23/14
to web...@googlegroups.com
Oh, would be great if you can test the image upload functionality (ie when using ckeditor to place an image, you should be able to upload images).



On Monday, 24 March 2014 07:04:36 UTC+11, Gael Princivalle wrote:
Thank you Tim.

This new version works well

Gael Princivalle

unread,
Mar 24, 2014, 3:54:58 AM3/24/14
to web...@googlegroups.com
Image upload with IE works great.
Replacing the complete plugin_ckeditor folder by the downloaded ckeditor folder works, but some ckeditor plugins are not availables.

I've try to put the full ckeditor version with all plugins, and a lot are missing.
Here is the full version demo:

For example I don't have the text color button.

Is it a problem due to ckeditor or to the ckeditor plugin for web2py ?

In attach file the full ckeditor plugin.

Regards. 
ckeditor_4.3.3_full.zip

Gael Princivalle

unread,
Mar 24, 2014, 5:59:31 AM3/24/14
to
With a new version of ckeditor, it miss this js file plugin, that have to be in the ckeditor root:
ckeip.js

I've take it from the Bruno Rocha Github.
Anyway adding plugin still a problem.

What I want to have for example is adding this plugin:

It have these dependencies:
http://ckeditor.com/addon/dialog (already installed, have dialogui dependecy)

I've upload all files, and add missing plugins in the ckeditor config.js .
CKEDITOR.editorConfig = function( config ) {
 config
.extraPlugins = 'widget,dialogui,oembed';
};

The oembed is not displayed.

I've tried also to add this really simple plugin, Save:

No way. It's not displayed.

I've try also only with the save plugin:
CKEDITOR.editorConfig = function( config ) {
 config
.extraPlugins = 'save';
};

It don't works.

Do you know how I can go ahead ?

Thanks.

Gael Princivalle

unread,
Mar 24, 2014, 6:24:07 AM3/24/14
to web...@googlegroups.com
Hi again.

I've saw that you've comment this config.js definition in plugin_ckeditor.py:
                function ckeditor_config() {
                   
return {
                        contentsCss
: %(contents_css)s,
                        filebrowserUploadUrl
: '%(upload_url)s',
                        filebrowserBrowseUrl
: '%(browse_url)s',
                        toolbar
: [
                           
{name: 'clipboard', items: ['Cut', 'Copy', 'Paste', 'PasteText', 'PasteFromWord', '-', 'Undo', 'Redo']},
                           
{name: 'editing', items: ['Find', 'Replace', '-', 'SelectAll', '-', 'SpellChecker', 'Scayt']},
                           
{name: 'links', items: ['Link', 'Unlink', 'Anchor']},
                           
{name: 'insert', items: ['Image', 'Flash', 'Table', 'SpecialChar']},
                           
{name: 'tools', items: ['Maximize', 'ShowBlocks', '-', 'Source']},
                           
'/',
                           
{name: 'styles', items: ['Format', 'Font', 'FontSize']},
                           
{name: 'basicstyles', items: ['Bold', 'Italic', 'Underline', 'Strike', '-', 'RemoveFormat']},
                           
{name: 'paragraph', items: ['NumberedList', 'BulletedList', '-', 'Outdent', 'Indent', 'JustifyLeft', 'JustifyCenter', 'JustifyRight', 'JustifyBlock']},
                       
],
                        scayt_autoStartup
: %(scayt)s,
                   
}
               
}
               
%(immediate)s

Perhaps we've to add here something...


Il giorno lunedì 24 marzo 2014 10:58:12 UTC+1, Gael Princivalle ha scritto:
With a new version of ckeditor, it miss this js file plugin, that have to be in the ckeditor root:
ckeip.js

I've take it from the Bruno Rocha Github.
Anyway adding plugin still a problem.

What I want to have for example is adding this plugin:

It have these dependencies:
http://ckeditor.com/addon/dialog (already installed, have dialogui dependecy)

I've upload all files, and add missing plugins in the ckeditor config.js .
CKEDITOR.editorConfig = function( config ) {
 config
.extraPlugins = 'widget,dialogui,oembed';
};

The oembed is not displayed.

I've tried also to add this really simple plugin, Save:

No way. It's not displayed.

I've try also only with the save plugin:
CKEDITOR.editorConfig = function( config ) {
 config
.extraPlugins = 'save';
};

It don't works.

Do you know how I can go ahead ?

Thanks.


Il giorno lunedì 24 marzo 2014 08:54:58 UTC+1, Gael Princivalle ha scritto:

Tim Richardson

unread,
Mar 25, 2014, 4:37:00 AM3/25/14
to web...@googlegroups.com
 Actually, I just came back here to ask you to try to new release. I commented out that javascript, it seems to work now but you may need to reload your browser cache

Gael Princivalle

unread,
Mar 25, 2014, 5:45:07 AM3/25/14
to web...@googlegroups.com
Well I've tried now on another computer with Chrome/IE/Firefox and the problem still the same, a lot of plugins are not displayed:
Immagine in linea 1
For example the text color picker.


2014-03-25 9:37 GMT+01:00 Tim Richardson <t...@growthpath.com.au>:
 Actually, I just came back here to ask you to try to new release. I commented out that javascript, it seems to work now but you may need to reload your browser cache

--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
---
You received this message because you are subscribed to a topic in the Google Groups "web2py-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/web2py/cbck_ammZYo/unsubscribe.
To unsubscribe from this group and all its topics, send an email to web2py+un...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Tim Richardson

unread,
Mar 25, 2014, 2:35:30 PM3/25/14
to web...@googlegroups.com
Hi, did you get the .w2p file from github?
https://github.com/timrichardson/web2py_ckeditor4/releases/download/R-0.2/web2py.plugin.ckeditor.w2p

I just a second ago updated web2py slices with the new version.

Gael Princivalle

unread,
Mar 25, 2014, 4:24:17 PM3/25/14
to web...@googlegroups.com

Hi Tim.

 

Yes I’ve take the file from Github now.

For me there’s no difference with the previous version. Image upload works fine.

Here is the Ckeditor toolbar that come with the w2p file:

 

Here is it with the full Ckeditor version:

 

It miss a lot of buttons.

Here is what it must be:

 

Perhaps there’re different kind of plugins, and some of them have to be add in the javascript that you’ve comment inside the py file.

But I think it’s better using the new way to write this file:

CKEDITOR.editorConfig = function( config ) {

                // Define changes to default configuration here. For example:

                // config.language = 'fr';

                // config.uiColor = '#AADC6E';

                config.extraPlugins = 'save';

};

 

Instead of:

function ckeditor_config() {

                    return {

 

---------------------------------

Gael Princivalle

gael.pri...@gmail.com

Profilo linkedin

Skype: gprincivalle

 

Da: web...@googlegroups.com [mailto:web...@googlegroups.com] Per conto di Tim Richardson
Inviato: martedì 25 marzo 2014 19:36
A: web...@googlegroups.com
Oggetto: Re: [web2py] Re: Ckeditor plugin - Update ckeditor

image001.emz
image002.png
oledata.mso
image003.emz
image004.png
image005.emz
image006.png

Tim Richardson

unread,
Mar 25, 2014, 7:08:03 PM3/25/14
to web...@googlegroups.com

I think I am seeing all plugins ... that's my screen shot above (although I had to delete my browser cache before it would display properly). That's with the "full" version of ckeditor.
As you've noticed, I removed the definition of the toolbar, letting ckeditor fall back to the defaults (which are presumably to show everything).

I'll look into what you say about a new way of setting up the config.
If you send my a github pull request for your preferred changes, I'll quickly review it. Otherwise I'll look at it, but I think the current release already does what you want.
I don't think a browser difference could cause this, but perhaps I didn't upload the release properly.





Tim Richardson

unread,
Mar 25, 2014, 7:37:46 PM3/25/14
to web...@googlegroups.com

Marco Mansilla

unread,
Apr 7, 2014, 4:17:31 AM4/7/14
to web...@googlegroups.com
El Tue, 25 Mar 2014 16:37:46 -0700 (PDT)
Tim Richardson <t...@growthpath.com.au> escribió:

> try this
> https://github.com/timrichardson/web2py_ckeditor4/releases/download/R-0.3/web2py.plugin.ckeditor.w2p
>

Hi, I'm having a really hard struggle with this, and so far I am really
sure that is not a ckeditor plugin error, but it is referred to.

I have changed the default template for my app, to one still boostrap
based, but to version 3, and made chages according to this[0] guide.

When I set {{extend 'layout.html'}}, everything works well but when a
change to {{extend 'my-custom-layout.html'}}, seems to be no problem
but the form elements supposed to have the ckeditor widgets show up as
regular text widgets.

Only hint I have is one line in firebug console saying:

TypeError: jQuery(...).ckeditor is not a function
jQuery('#posts_post_content').ckeditor(config);

The whole script code marked as error is:

<script type="text/javascript">
function ckeditor_config() {
return {
contentsCss:
['/myapp/static/css/base.css','/myapp/static/plugin_ckeditor/contents.css'],
filebrowserUploadUrl: '/myapp/plugin_ckeditor/upload',
filebrowserBrowseUrl: '/myapp/plugin_ckeditor/browse', toolbar: [
{name: 'clipboard', items: ['Cut', 'Copy', 'Paste',
'PasteText', 'PasteFromWord', '-', 'Undo', 'Redo']}, {name: 'editing',
items: ['Find', 'Replace', '-', 'SelectAll', '-', 'SpellChecker',
'Scayt']}, {name: 'links', items: ['Link', 'Unlink', 'Anchor']}, {name:
'insert', items: ['Image', 'Flash', 'Table', 'SpecialChar']}, {name:
'tools', items: ['Maximize', 'ShowBlocks', '-', 'Source']}, '/',
{name: 'styles', items: ['Format', 'Font', 'FontSize']},
{name: 'basicstyles', items: ['Bold', 'Italic', 'Underline',
'Strike', '-', 'RemoveFormat']}, {name: 'paragraph', items:
['NumberedList', 'BulletedList', '-', 'Outdent', 'Indent',
'JustifyLeft', 'JustifyCenter', 'JustifyRight', 'JustifyBlock']}, ],
scayt_autoStartup: true,
}
}

jQuery(function() {
var config = ckeditor_config();
jQuery('#posts_post_content').ckeditor(config); <!--fail-->
});
</script>

I guess I'm missing some script to include but not shure which one.
Jquery, web2py_ajax, and everything else is called in the custom-layout
file.

Thanks in advance.

Marco

[0]
http://www.web2pyslices.com/slice/show/1516/adapt-a-css-template-to-web2py-layouthtml

Marco Mansilla

unread,
Apr 7, 2014, 11:28:55 AM4/7/14
to web...@googlegroups.com
El Mon, 7 Apr 2014 05:17:31 -0300
Marco Mansilla <thebig...@gmail.com> escribió:
Sorry... never mind... I just needed to call
plugin_ckeditor/adapters/jquery.js

Marco.

Alex Glaros

unread,
Mar 5, 2015, 12:17:04 PM3/5/15
to web...@googlegroups.com
can someone tell me how to install the plugin?

assume I've never installed a plugin, don't know what directory to put it in, and don't know basic plugin concepts.  Have tried downloading and inserting everywhere but need info gaps filled.

thanks

Alex Glaros

Willoughby

unread,
Mar 5, 2015, 12:58:30 PM3/5/15
to web...@googlegroups.com
Have you reviewed the chapter on plugins?

Alex Glaros

unread,
Mar 5, 2015, 1:26:14 PM3/5/15
to
somehow I missed the simplicity of installation - it's installed now but resulting web page displays the HTML code instead of implementing them

how to create the HTML action and not display the HTML code?

looks like: <p>gov improvement</p> <p>&nbsp;</p> <p><strong>testing this text editor</strong></p>

the db field that's used is "text".  

thanks

Alex

Willoughby

unread,
Mar 5, 2015, 1:35:48 PM3/5/15
to web...@googlegroups.com


On Thursday, March 5, 2015 at 1:26:14 PM UTC-5, Alex Glaros wrote:
somehow I missed the simplicity of installation - it's installed now but resulting web page displays the HTML code instead of implementing them

how to make create the the HTML action and not display the HTML code?

Alex Glaros

unread,
Mar 5, 2015, 1:59:56 PM3/5/15
to web...@googlegroups.com
yes, I imported as stated on slices and github

the only way to get it to display correctly is if escape out, in the view, e.g.,

<P>{{=XML(personID.summarySelfDescription, sanitize=False)}}</p>

any ideas why others don't have to escape?

is it safe to do that?

thanks

Alex

Alex Glaros

unread,
Mar 5, 2015, 2:04:14 PM3/5/15
to web...@googlegroups.com
sanitize=TRUE works, don't need FALSE

Alex Glaros

unread,
Mar 5, 2015, 2:09:48 PM3/5/15
to web...@googlegroups.com
sanitize=True doesn't work on all styles/sizes/fonts.  sanitize=False works consistently

Gael Princivalle

unread,
Mar 20, 2015, 5:02:56 PM3/20/15
to web...@googlegroups.com
Hello all.

Someone have an experience about how applying css files to CKeditor contents?

I've tried to understand this document without success:

Thanks.
Reply all
Reply to author
Forward
0 new messages