Skip to content
This repository has been archived by the owner on Apr 14, 2022. It is now read-only.
/ pesdk-ruby-gem-demo Public archive

[Deprecated] Ruby Gem Demo for PhotoEditorSDK HTML5

License

Notifications You must be signed in to change notification settings

imgly/pesdk-ruby-gem-demo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

56 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

You can find our latest examples at https://github.com/imgly/pesdk-web-examples.

PhotoEditor SDK for HTML5 Ruby/Rails Gem Demonstration

Rails Gem for easily integrating PhotoEditor SDK for HTML5 in Ruby on Rails.

Note

The PhotoEditor SDK is a product of img.ly GmbH. Please request a license. Please see LICENSE.md for licensing details.

PhotoEditor SDK for HTML5.

The PhotoEditor SDK for HTML5 is a fully customizable photo editor which you can integrate into your Rails app within minutes.

Setup the Rails asset pipeline

  1. 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'
...
  1. 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
...
  1. 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',
  })
}
...
  1. Now, put a <div/> element in the view
...
<div id="pesdk"  style="width: 1024px; height: 768px;">
...

License

Please see LICENSE for licensing details.

Authors and Contributors

Made 2013-2020 by img.ly

Support or Contact

Use our service desk for bug reports or support requests. To request a commercial license, please use the license request form on our website.