Or you can create a widget like this and just set widget=ckedit in your 
table definition.

def ckedit(field, value): 
    """ widget for wysiwyg html editing """
    return TEXTAREA(_id = str(field).replace('.','_'), _name=field.name, 
                  _class='text ckeditor', value=XML(value, sanitize=True), 
_cols=800, _rows=10)

On Thursday, 30 August 2012 17:47:10 UTC+1, simon wrote:
>
> You just set class=ckeditor
>
> If it is in a SQLFORM then the fields have id=tablename_fieldname. So you 
> just have to do:
>
> $(document).ready(function() { 
>         $('#tablename_fieldname').addClass('ckeditor')
> })
>
>
>
> On Thursday, 30 August 2012 15:57:47 UTC+1, Picheth wrote:
>>
>> Hi simon
>>
>> How do I set a field to ckeditor ?
>>
>>>
>>>> Picheth.
>>>>
>>>

-- 



Reply via email to