Open Paulo-AndradeDev opened 1 year ago
You can use the javascript version of TinyMCE and embed it in your project.
in the admin.py file please add a form overide and use the model provided by tinyMCE
@admin.register(Post)
class PostAdmin(ModelAdmin):
list_display = ('title', 'slug', 'publish', 'created')
list_filter = ('created', 'publish')
search_fields = ('title', 'content')
prepopulated_fields = {'slug': ('title',)}
date_hierarchy = 'publish'
ordering = ('-publish',)
formfield_overrides = {
tinymce.models.HTMLField: {'widget': TinyMCE(attrs={'cols': 80, 'rows': 30})},
}
Hi there!
I need to replace textarea with rich text editor in Django Admin.
I tryed out the TyniMCE lib.
However the TyniMCE rich text editor do not work when I use the "material.admin" app. The Django admin only display the text editor if I unregister the "material.admin" app. I figured out that they are “incompatible with each other. I guess, the Django-material-admin overrides the tyniMCE's CSS/Js.
How to solve that problem or
which are the best Django rich text editor to use while use Material-Admin (material.admin" app) as well? Or
Thanks in advance.