barryvdh / laravel-elfinder

elFinder bundle for Laravel
738 stars 169 forks source link

TinyMCE 4.x #46

Open franccro opened 9 years ago

franccro commented 9 years ago

Hi. In function elFinderBrowser there is no elfinder_url to change... Could you please explain in more details how to add elfinder to Tinymce.

phanvannhien commented 9 years ago
function elFinderBrowser (field_name, url, type, win) {
  tinymce.activeEditor.windowManager.open({
    file: '<?= route('elfinder.tinymce4') ?>',// use an absolute path! elfinder_url here and you can replace with:  "/elfinder/tinymce4"
    title: 'elFinder 2.0',
    width: 900,
    height: 450,
    resizable: 'yes'
  }, {
    setUrl: function (url) {
      win.document.getElementById(field_name).value = url;
    }
  });
  return false;
}
atorscho commented 9 years ago

@phanvannhien your answer is not very clear. What do you mean? I didn't get this explanation either.