Help with custom code

I’m trying to recreate this functionality in Webflow:
in this project:

No matter what I do - paste all code with the embed function or as custom code, it doesn’t seem to work.

I’ve got the raw html file which works (pasted below) but when I input the same content in to webflow, it breaks.

Please help.



<!DOCTYPE html>
  .cropit-preview {
    background-color: #f8f8f8;
    background-size: cover;
    border: 1px solid #ccc;
    border-radius: 3px;
    margin-top: 7px;
    width: 250px;
    height: 250px;

  .cropit-preview-image-container {
    cursor: move;

  .image-size-label {
    margin-top: 10px;

  input, .export {
    display: block;

  button {
    margin-top: 10px;
Resize image
Rotate counterclockwise Rotate clockwise
  <button class="export">Export</button>

  $(function() {
      imageState: {
        src: '',

    $('.rotate-cw').click(function() {
    $('.rotate-ccw').click(function() {

    $('.export').click(function() {
      var imageData = $('.image-editor').cropit('export');;
1 Like