Ticket #140 (closed enhancement: fixed)

Opened 21 months ago

Last modified 21 months ago

Integration example for Django filebrowser

Reported by: jonasvp Owned by: jf.hovinne
Priority: minor Milestone:
Component: editor Version: trunk
Keywords: plugin Cc:

Description

I wrote a function to integrate Wymeditor with the Django filebrowser and just wanted to save other people the trouble... maybe you could put this on the Contrib/IntegrateInDjango page, it seems I can't edit wiki pages.

Basically, you need to download the attached file, set the fb_url variable to point to your filebrowser instance and add the file to your Javascript headers:

  <script type="text/javascript" src="/media/wymeditor/plugins/jquery.wymeditor.filebrowser.js"></script>

Add the postInitDialog parameter to the Wymeditor initialization:

  $('textarea').wymeditor({
    postInitDialog: wymeditor_filebrowser
  });

If you already have a postInitDialog function, you need to put a call to wymeditor_filebrowser inside that function. Then you should be able to click on the Filebrowser link to select an image.

Attachments

jquery.wymeditor.filebrowser.js (0.8 kB) - added by jonasvp 21 months ago.
Function to integrate wymeditor with Django filebrowser

Change History

Changed 21 months ago by jonasvp

Function to integrate wymeditor with Django filebrowser

Changed 21 months ago by jf.hovinne

  • status changed from new to assigned

Cool, thanks for sharing!

You've been added to the contributors group, so you can edit wiki pages.

Please feel free to edit the Contrib/IntegrateInDjango page, or to create a new one.

Changed 21 months ago by jonasvp

  • status changed from assigned to closed
  • resolution set to fixed

Thanks, jf. I put the snippet on the Django page.

Note: See TracTickets for help on using tickets.