Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to use the React library with includeUi set to false ? #875

Open
DyRize opened this issue Jun 28, 2023 · 0 comments
Open

How to use the React library with includeUi set to false ? #875

DyRize opened this issue Jun 28, 2023 · 0 comments
Labels

Comments

@DyRize
Copy link

DyRize commented Jun 28, 2023

Summary
I am encountering an issue while using your React library.
I can't figure out how to import an image and set up an editing area while passing the includeUi parameter as false.

I have tried several approaches, including the loadImageFromUrl and addImageObject methods, but without success.

How can I use the library without the UI to integrate it directly into my React component?

There seem to be many unanswered questions regarding this topic.

Thank you in advance!

Code

const ImageEditingContent = () => {
  const editorRef = createRef();
  const imagePath = '...';

  return (
    <div className="hk-pt-1">
      <div className="hk-w-140 hk-h-[315px]">
        <ImageEditor
          ref={editorRef}
          includeUi={false}
          cssMaxHeight={315}
          cssMaxWidth={560}
          usageStatistics={false}
        />
      </div>
      <div className="hk-mt-5 hk-m-auto hk-w-fit">
        <></>
      </div>
    </div>
  );
};

Version
^3.15.2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant