javascript - Adding an extra button to Tinymce popup -
i need in adding browse button image poup in tinymce. need div itself, nothing extra.
i'm using tinymce v4
this config:
tinymce.init({ selector: "#id_content", plugins : 'advlist autolink link image lists charmap print preview media', file_browser_callback : "mycustomfilebrowser" });
the file_browser_callback
adds browse button, throws error every time clicked(and want avoid that).
i'm guessing error message "typeerror: not function". need give function itself, not string containing name.
tinymce.init({ selector: "#id_content", plugins: 'advlist autolink link image lists charmap print preview media', file_browser_callback: function (inputid, url, type, callerwindow) { console.log('store chosen ' + type + ' url in #' + inputid); } });
or
tinymce.init({ selector: "#id_content", plugins: 'advlist autolink link image lists charmap print preview media', file_browser_callback: mycustomfilebrowser });
more details on interface: http://www.tinymce.com/wiki.php/configuration:file_browser_callback
Comments
Post a Comment