Re: [web2py] Re: ckeditor : how to make read only, how to remove the toolbar in a dynamic way

2015-02-10 Thread Serge Bourgeois
I'd like to share the solution I found (maybe not the best?), in case it could be usefull to other: 1. collapse the top bar either with editing the app/static/plugin_ckeditor/config.js file like this: CKEDITOR.editorConfig = function( config ) { // Define changes to default configuration

Re: [web2py] Re: ckeditor : how to make read only, how to remove the toolbar in a dynamic way

2015-02-03 Thread Serge Bourgeois
If I could find a way to add a way to change, in the view this : > Thanks for your response. > > The solution I'm looking for should preserve the way ckeditor displays the > text. > > Based on you idea, I tried this in my controller: > > db.my_table.my_field.represent = lambda value, row: > cked

Re: [web2py] Re: ckeditor : how to make read only, how to remove the toolbar in a dynamic way

2015-02-03 Thread Serge Bourgeois
Thanks for your response. The solution I'm looking for should preserve the way ckeditor displays the text. Based on you idea, I tried this in my controller: db.my_table.my_field.represent = lambda value, row: ckeditor.widget(db.my_table.my_field, value, **{'_name':'my_field_row_%s' % row.id })

[web2py] Re: ckeditor : how to make read only, how to remove the toolbar in a dynamic way

2015-02-02 Thread Tim Nyborg
Depends on how you're implementing the widget. I've got a CKEditor widget as follows (pretty much a glorified copy of text.widget with the ckeditor class): class CKEditor(FormWidget): _class = 'ckeditor' @classmethod def widget(cls, field, value, **attributes): """