New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

FileBrowser

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

FileBrowser

A multi-purpose filebrowser.

  • 1.3.0
  • latest
  • npm
  • Socket score

Version published
Weekly downloads
4
decreased by-33.33%
Maintainers
1
Weekly downloads
 
Created
Source

FileBrowser

Build Status PRs Welcome MIT License GitHub release GitHub commits

A multi-purpose filebrowser. This is initially intended to be a CKEditor file browser plugin but can be easily adapted to integrate with TinyMCE among others.

FileBrowser anim

Demo with CKEditor

See here a demo.

Installation

With CKEditor
  • Download and enable the FileBrowser plugin which is inside ckeditor/plugins/:

    // plugin name
    var browser_plugin = 'filebrowser_upload';
    // path to plugin
    var plugin_path = 'http://example.com/ckeditor/plugins/'
    
    // add it to CKEditor
    CKEDITOR.plugins.addExternal(browser_plugin, plugin_path + browser_plugin + '/');
    
    // instantiate CKEditor
    var ckeditor = CKEDITOR.replace('editor', {
      extraPlugins: 'filebrowser_upload',
      extraAllowedContent: 'img[src,alt,width,height]',
      toolbarGroups: [
        { name: 'basicstyles', groups: ['basicstyles', 'cleanup', 'colors'] },
        { name: 'tools', groups: ['tools'] },
        { name: 'upload', groups: ['filebrowser'] } // <==== here we are
      ]
    });
    
  • Instantiate FileBrowser with some options and tell it about which is your CKEDITOR instance:

      var browser = new FileBrowser({
        root_http: 'http://example.com/server-side/writable',
        server_http: 'http://example.com/server-side/filebrowser.php',
      });
      // ckeditor == instanceof CKEDITOR
      browser.setEditor(ckeditor);
      
      // this is a must
      // it is a global function which is expected by FileBrowser plugin
      window.showFileBrowser = function(){
        browser.show();
      };
    
  • Download server-side/*.php and adjust according to your needs

Notes

OK, I admit, this documentation is a bit incomplete, but we will get there.

FAQs

Package last updated on 15 Sep 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc