You can find our latest examples at https://github.com/imgly/pesdk-web-examples.
Rails Gem for easily integrating PhotoEditor SDK for HTML5 in Ruby on Rails.
The PhotoEditor SDK is a product of img.ly GmbH.
Please request a license. Please see LICENSE.md
for licensing details.
The PhotoEditor SDK for HTML5 is a fully customizable photo editor which you can integrate into your Rails app within minutes.
- Reference Gem in your bundlers Gemfile. Open your
Gemfile
and insert
...
gem 'pesdk-html5-rails', :git => 'https://github.com/imgly/pesdk-ruby-gem-demo.git'
...
- Register javascript with the Rails asset pipeline. Open
/assets/javascripts/application.js
and insert the following lines
...
//= require react.production.min
//= require react-dom.production.min
//= require react-dom-server.browser.production.min
//= require styled-components.min
//= require photoeditorsdk
...
- Create a custom javascript file or modify your
application.js
to initialize the PhotoEditor UI on window load as follows
...
window.onload = function () {
PhotoEditorSDK.PhotoEditorSDKUI.init({
container: '#pesdk',
license: '', // <- replace this with the content of your license file. The JSON-object needs to be in string format
image: '', // <- Image url or Image path relative to assets folder
assetBaseUrl: '/assets',
})
}
...
- Now, put a
<div/>
element in the view
...
<div id="pesdk" style="width: 1024px; height: 768px;">
...
Please see LICENSE for licensing details.
Made 2013-2020 by img.ly
Use our service desk for bug reports or support requests. To request a commercial license, please use the license request form on our website.