Ask Your Question

askbot_imageuploader is not working with tinymce

asked 2013-05-27 08:54:57 -0600

jqy3222089's avatar

updated 2013-05-28 06:34:27 -0600

Evgeny's avatar

I have changed the editor into tinymce, but askbot_imageuploader and askbot_attachment are not working correctly.

BTW I did not changed the configuration of django-tinymce.

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted

answered 2013-05-27 21:46:10 -0600

Evgeny's avatar

updated 2013-05-28 06:33:46 -0600

Make sure that DEBUG=False in the There is a weird feature in the tinymce app that it won't load custom extensions with the js compressor for tinymce enabled, so those two button show only in the production mode.

I've checked this on the dev branch - works for me. If the buttons show, but the images don't insert, it could be that your MEDIA_ROOT is not server-writeable.

edit flag offensive delete link more


Those two buttons didn't show in the tinymce tool bar.

jqy3222089's avatar jqy3222089  ( 2013-05-28 06:29:01 -0600 )edit

Got it now - updated my answer.

Evgeny's avatar Evgeny  ( 2013-05-28 06:34:06 -0600 )edit

answered 2013-05-28 07:00:58 -0600

jqy3222089's avatar
def get_file_contents(filename):
    base_path = tinymce.settings.JS_ROOT
    if settings.DEBUG and settings.STATIC_ROOT:
        from django.contrib.staticfiles import finders
        base_path = finders.find('tiny_mce')

        f = open(os.path.join(base_path, filename))
    except IOError:
        return ""

this is one of the django-tinymce files, so if you are in debug mode, it will use the root of django-tinymce to load the js files.

edit flag offensive delete link more


@Evgeny and also the TINYMCE_JS_ROOT needs to be adjusted in windows TINYMCE_JS_ROOT = os.path.join(STATIC_ROOT, 'default/media/js/tinymce/').replace('\','/')

jqy3222089's avatar jqy3222089  ( 2013-05-28 07:37:45 -0600 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower


Asked: 2013-05-27 08:54:57 -0600

Seen: 336 times

Last updated: May 28 '13