Django+django-filebrowser+TinyMCE -


i added tinymce (directly, not django-tinymce) , django-filebrowser django admin. works, except 1 thing: click file browse button on tiny "add picture" menu, page not found (404), because don't understand means string in tiny options:

var managerurl = window.location.tostring()         + 'media/upload/?type=' + type; 

full code:

<script type="text/javascript"> function tinydjangobrowser(field_name, url, type, win) { var managerurl = window.location.tostring()         + 'media/upload/?type=' + type;  tinymce.activeeditor.windowmanager.open({     file: managerurl,     title: 'pic',     width: 800,     height: 450,     resizable: 'yes',     inline: 'yes',     close_previous: 'no',     popup_css : false }, {     window: win,     input: field_name });  return false; }    tinymce.init({     mode : "specific_textareas",     theme : "advanced",     skin : "bootstrap",             plugins : "safari,pagebreak,style,layer,table,save,advhr,advimage,advlink,emotions,iespell,inlinepopups,insertdatetime,preview,media,searchreplace,print,contextmenu,paste,directionality,fullscreen,noneditable,visualchars,nonbreaking,xhtmlxtras,template",             extended_valid_elements : 'script[type|src],iframe[src|style|width|height|scrolling|marginwidth|marginheight|frameborder],div[*],p[*],object[width|height|classid|codebase|embed|param],param[name|value],embed[param|src|type|width|height|flashvars|wmode]',     media_strict: false,             theme_advanced_buttons1 : "save,newdocument,|,bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,formatselect,fontselect,fontsizeselect",             theme_advanced_buttons2 : "cut,copy,paste,pastetext,pasteword,|,search,replace,|,bullist,numlist,|,outdent,indent,blockquote,|,undo,redo,|,link,unlink,anchor,image,cleanup,help,code",             theme_advanced_buttons3 : "tablecontrols,|,hr,removeformat,visualaid,|,sub,sup,|,charmap,iespell,media,advhr,|,print,|,fullscreen",             theme_advanced_buttons4 : "insertlayer,moveforward,movebackward,absolute,|,styleprops,|,cite,abbr,acronym,del,ins,attribs,|,visualchars,nonbreaking,template,pagebreak,|,insertdate,inserttime,preview,|,forecolor,backcolor",             theme_advanced_toolbar_location : "top",             theme_advanced_toolbar_align : "left",             theme_advanced_statusbar_location : "bottom",             theme_advanced_resizing : true,             file_browser_callback: 'tinydjangobrowser',     relative_urls : "false",     remove_script_host : false,     convert_urls : false   }); </script> 

tell me please, how should in case?

one more thing: need connect tiny_mce_popup.js? sorry bad english. thx!

i found! in case should

var managerurl = '/admin/filebrowser/browse/?pop=2' 

Comments

Popular posts from this blog

ruby - Trying to change last to "x"s to 23 -

jquery - Clone last and append item to closest class -

c - Unrecognised emulation mode: elf_i386 on MinGW32 -