Django-tinymce full featured in admin
Asked Answered
C

2

7

I set up django-tinymce to work with admin just like the docs described

in settings

INSTALLED_APPS = [ ..., 'tinymce',]

in models I added

from tinymce.models import HTMLField
content = HTMLField()

and in urls

urlpatterns = [ ...., url(r'^tinymce/', include('tinymce.urls')),]

But I can not figure out how to add icons and plugins ! I did a lot of research and I could not find anything useful.

I need a Full Featured editor.

Carillonneur answered 21/12, 2016 at 23:50 Comment(2)
Where are your js (query, bootstrap.js) links in your Base.html? If your page is loading the tinyMCE js links before jquery it won't run. I had a similar problem using redactor wsyiwyg editor. Check your page source and see which one loads first.Inspiratory
you need to customize it more, lie @Inspiratory said, you are missing a bunch of configuration in your settings.pyUndercharge
E
8

TINYMCE is great. But at times, it fails to send input back to the server.

One of the alternatives to TINYMCE is django-summernote, which is easy to setup and use.

Check django-summernote here: https://github.com/summernote/django-summernote

Emlin answered 22/12, 2016 at 9:38 Comment(1)
Thank you, Exactly what I was looking for ! Works like a charm and easy to configure and well documented !Carillonneur
L
1

You are missing some configurations settings .py

TINYMCE_JS_URL = 'http://debug.example.org/tiny_mce/tiny_mce_src.js'
TINYMCE_DEFAULT_CONFIG = {
    'plugins': "table,spellchecker,paste,searchreplace",
    'theme': "advanced",
    'cleanup_on_startup': True,
    'custom_undo_redo_levels': 10,
}
TINYMCE_SPELLCHECKER = True
TINYMCE_COMPRESSOR = True

this is the example given in the docs...try it out http://django-tinymce.readthedocs.io/en/latest/installation.html

Lewan answered 22/12, 2016 at 9:12 Comment(1)
I did what you said, everything seems to work fine except that I can't add any more plugins, like emotions and iframes, if I add them to the plugins, they do not show up. how can I add them ?Carillonneur

© 2022 - 2024 — McMap. All rights reserved.