<script>
  function elFinderBrowser (field_name, url, type, win) {
    tinymce.activeEditor.windowManager.open({
      file: '{{ request.route_url(IMJOY_ELFINDER_FILEBROWSER) }}',
      title: 'elFinder 2.0',
      width: 900,
      height: 500,
      resizable: 'yes'
    }, {
      setUrl: function (url) {
        win.document.getElementById(field_name).value = url;
      }
    });
    return false;
  }
</script>
