python - django: disable tinymce for one certain field -


i have lot of models tinymce(django-tinymce) enabled default textfields , ok. 1 field don't want apply tinymce widget (in admin interface). please tell me how implement that?

    class page(models.model):         1 = models.textfield()         2 = models.textfield()         3 = models.textfield() 

yes, in tinymce.init(), do:

tinymce.init({         ...         editor_deselector : "mcenoeditor" }); 

and add class mcenoeditor textarea want disable tinymce on.

here relevant documentation

in example, if want disable on three,

three = models.textfield(widget=form.textarea(attrs={"class": "mcenoeditor"})) 

Comments

Popular posts from this blog

c# - Validate object ID from GET to POST -

node.js - Custom Model Validator SailsJS -

php - Find a regex to take part of Email -