tinymce-rails
tinymce-rails copied to clipboard
file_browser_callback should be function, being placed as string
I'm not sure how to get this to work. I tried <%= tinymce file_browser_callback: :fileBrowser %>
and <%= tinymce file_browser_callback: 'fileBrowser' %>
, but they are both outputting JS strings, but this is a callback function fileBrowser() {...}
that exists elsewhere in javascript. Is there a secret to this, or would this have to be added as a special case configuration?
Maybe my answer is #62, though it's a bit of a hack, this works for now.
<%= tinymce file_browser_callback: "function() { return postsFileBrowser.apply(this, arguments); }" %>
Hi,
I would like to know what and where is the postsFileBrowser in the code.
@juliatjoy IIRC, that was my own custom function which showed a modal window.
You might look at this article for more information: https://www.tinymce.com/docs-3x/howto/TinyMCE3x@How-to_implement_a_custom_file_browser/