Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>I updated the Wiki, should work now when following the steps: <a href="https://github.com/Studio-42/elFinder/wiki/Integration-with-TinyMCE-4.x" rel="noreferrer">https://github.com/Studio-42/elFinder/wiki/Integration-with-TinyMCE-4.x</a></p> <p>Primary changes are that TinyMCE doesn't use the InlinePopup plugin any more, the callback is changed and instead of <code>file_browser_callback : 'elFinderBrowser'</code> you have to remove the quotes:</p> <p>In the TinyMCE init: <code>file_browser_callback : elFinderBrowser</code></p> <p>Add the elFinderBrowser callback to your javascript:</p> <pre><code>function elFinderBrowser (field_name, url, type, win) { tinymce.activeEditor.windowManager.open({ file: '/elfinder/elfinder.html',// use an absolute path! title: 'elFinder 2.0', width: 900, height: 450, resizable: 'yes' }, { setUrl: function (url) { win.document.getElementById(field_name).value = url; } }); return false; } </code></pre> <p>And finally modify/copy elfinder.html file to use the callback:</p> <pre><code>&lt;!-- Include jQuery, jQuery UI, elFinder (REQUIRED) --&gt; &lt;script type="text/javascript"&gt; var FileBrowserDialogue = { init: function() { // Here goes your code for setting your custom things onLoad. }, mySubmit: function (URL) { // pass selected file path to TinyMCE top.tinymce.activeEditor.windowManager.getParams().setUrl(URL); // close popup window top.tinymce.activeEditor.windowManager.close(); } } $().ready(function() { var elf = $('#elfinder').elfinder({ // set your elFinder options here url: 'php/connector.php', // connector URL getFileCallback: function(file) { // editor callback FileBrowserDialogue.mySubmit(file.url); // pass selected file path to TinyMCE } }).elfinder('instance'); }); &lt;/script&gt; </code></pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload