Skip to content
This repository has been archived by the owner on Oct 23, 2021. It is now read-only.

Multiple Timymce toolbars settings #54

Open
gusarg81 opened this issue Apr 21, 2019 · 6 comments
Open

Multiple Timymce toolbars settings #54

gusarg81 opened this issue Apr 21, 2019 · 6 comments

Comments

@gusarg81
Copy link

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.

@merwok
Copy link
Contributor

merwok commented Apr 21, 2019

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

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

@gusarg81
Copy link
Author

gusarg81 commented May 7, 2019

Hi!

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

widgets = { 'message': TinyMCE() }

@merwok
Copy link
Contributor

merwok commented May 7, 2019

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.

@gusarg81
Copy link
Author

gusarg81 commented May 7, 2019

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)}

@merwok
Copy link
Contributor

merwok commented Aug 2, 2019

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

@gusarg81
Copy link
Author

gusarg81 commented Aug 2, 2019

This should be documented, I think.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants