Sample code and templates
We have a shiny, new BEE Plugin technical docs site.
You can find a new version of this page here
Sample code: embedding the editor
Here is some sample code to get you and up running in no time.
- Client-side example (HTML/JS)
- RAILS APP
- PHP - Community contribution - thank you!
- PERL 5, Dancer - Community contribution - thank you!
- Node.js - Community contribution - thank you!
- NPM JS - BETA, let us know how if you have any feedback.
Using the client-side example, you can literally try out BEE Plugin in 2 minutes...
- Download the client-side sample code: ClientSideImplementation
- Open clientSideImplementation/index.html with your favorite code editor
- Locate client_id and replace "YOUR_CLIENT_ID" with yours
- Locate client_secret and replace "YOUR_CLIENT_SECRET" with yours
- Save the file
- Open it in your browser and get creative
To obtain your Client ID and Client Secret sign up here (it's free).
You can connect BEE Plugin to your own file system (e.g. to let users of your app find images where they already exist).
The file below is a file system provider API built in Python. It's based on Django and connects BEE Plugin to an Amazon Web Services S3 bucket.
Other programming languages
Download, collaborate, and contribute: https://github.com/BEE-Plugin/BEE-FREE-templates
To use any of the sample code mentioned above you will need to first create an application on developers.beefree.io/signup (i.e. the application where the editor will be embedded) and obtain your application keys.
Here is an example of the application details page where the application keys are found.
Other important notes about using sample code
Before using the code samples listed above in a production environment, please consider the following:
- The client-side sample is not safe for a production environment (it was conceived as a quick way for you to test the application). Someone would be able to easily steal your application credentials (just viewing the source code of the page). To keep those credentials safe, authorization must be managed sever-side, as the .NET sample does.
- These code samples use a limited set of features and configurations: they can be a good starting point to start developing around BEE, but they are not an exhaustive showcase of everything you can do.
- All sample code is provided "as is": it may contain defects, it may not follow best practices (although we try to!), and it should only be considered as point of reference.