Guest User

Untitled

a guest
Feb 18th, 2019
110
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.26 KB | None | 0 0
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <!-- React Dependencies for the SDK UI -->
  5. <script src="../../js/vendor/react.production.min.js"></script>
  6. <script src="../../js/vendor/react-dom.production.min.js"></script>
  7. <script src="../../js/vendor/prop-types.min.js"></script>
  8. <!-- PhotoEditor SDK-->
  9. <script src="../../js/PhotoEditorSDK.min.js"></script>
  10. <!-- PhotoEditor SDK UI -->
  11. <script src="../../js/PhotoEditorSDK.UI.DesktopUI.min.js"></script>
  12. <link rel="stylesheet" href="../../css/PhotoEditorSDK.UI.DesktopUI.css" />
  13. </head>
  14.  
  15. <body>
  16. <div id="editor" style="width: 100vw; height: 100vh;"></div>
  17. <script>
  18. window.onload = function () {
  19. var image = new Image()
  20. image.onload = function () {
  21. var container = document.getElementById('editor')
  22. var editor = new PhotoEditorSDK.UI.DesktopUI({
  23. container: container,
  24. license: '',
  25. editor: {
  26. image: image,
  27. defaultControl: 'transform'
  28. },
  29. assets: {
  30. baseUrl: '../../assets' // <-- This should be the absolute path to your `assets` directory
  31. }
  32. })
  33. }
  34. image.src = '../shared/assets/700-500.jpg'
  35. }
  36. </script>
  37. </body>
  38. </html>
Add Comment
Please, Sign In to add comment