TinyMCE Integration

You can use FileRun as a filemanager for inserting download links and images to a TinyMCE editor.

To get started, initialize your editor like this:

 1tinymce.init({
 2    selector:'textarea',
 3    plugins: 'filerun',
 4    filerun: {
 5        windowTitle: 'Insert file from FileRun', //RENAME FREELY
 6        buttonTitle: 'Insert file from FileRun', //RENAME FREELY
 7        folderPath: '#/HOME', //the folder path as present in the FileRun URL when browsing folders
 8        searchFor: { //OPTIONAL
 9            metatype: '2', //SEARCH FOR PHOTOS
10            meta: {
11                tags: ['lady', 'pink']
12            }
13        }
14    },
15    external_plugins: {
16        'filerun': 'HTTPS://FILERUN-URL/js/?s=tinymce' //SET YOUR URL
17    },
18    toolbar: 'filerun'
19});

For more search parameters, see: API: Searching and Search.

How it works

  1. Open your TinyMCE editor.
  2. Select Insert → Insert file from FileRun
  3. A popup will open FileRun
  4. Browse to your desired file, click it to select it, and use the big button Select showing on the top toolbar.

FileRun will then create a web link for the selected file and insert it back into the editor. Note that if the file already has a web link, it will be used as it is, with the existing options.

If the selected file is a web-compatible image file, the actual image will be inserted into the editor. For the rest of the files, a simple link will be inserted, with the file's name as the tile.