django-tinymce4-lite icon indicating copy to clipboard operation
django-tinymce4-lite copied to clipboard

Multiple Timymce toolbars settings

Open gusarg81 opened this issue 5 years ago • 6 comments

Hi,

Is there a way to setup mutiple settings? Leys say I want one tinyce settings (specially, the toolbar) for the admin section of my site and another for the public section (users).

Thanks.

gusarg81 avatar Apr 21 '19 16:04 gusarg81

I couldn’t find the reference in the docs, but this works:


class SomeModel(models.Model):
    content = HTMLField(profile=dict_with_settings)

merwok avatar Apr 21 '19 22:04 merwok

Hi!

Thanks for reply. Would it work when I set the widget from the ModelForm? Since I always use:

widgets = { 'message': TinyMCE() }

gusarg81 avatar May 07 '19 21:05 gusarg81

Ah in that case you’d need to pass the right param (I forget if it’s profile or mce_something) to the TinyMCE widget class.

merwok avatar May 07 '19 21:05 merwok

Maybe mce_attrs?

EDIT: well, it just works with profile as well (when tested the first time didn't work, maybe a typo).

widgets = {'message': TinyMCE(profile=settings.TINYMCE_BASIC_CONFIG)}

gusarg81 avatar May 07 '19 21:05 gusarg81

So it this a doc issue, or should be closed?

merwok avatar Aug 02 '19 01:08 merwok

This should be documented, I think.

gusarg81 avatar Aug 02 '19 04:08 gusarg81