Ticket #140 (closed enhancement: fixed)
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.