Replies: 2 comments 2 replies
-
|
Hi @fitschgo You are absolutely right! I'm trying to use this library in HTML with vanilla javascript. I got the minimum working because I found this post. So thank you for that. Can you also give an example how to change the options or template, since none of that seems to work. |
Beta Was this translation helpful? Give feedback.
-
|
I am having a lot of problems getting this to work too. I initially followed the installation instruction in the Guide on the website, but found that it does not work if you do that, just like @fitschgo indicates. After that, I just copied the hello world-example from the website, and that does work. I would suggest changing the guide to use the code used there. But now, I want to use a couple of options, mainly a fixed aspect ratio for the selection. I have read the entire guide and API-sections, and I see that there are options for it, but I cannot find anywhere how to actually use those options. I also tried going though the code of the playground, but that is a completely different type of code, so that is of no use either. Therefore, a bit more documentation is needed in my opinion. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello,
First, thanks a lot for your contribution!
I just installed cropperjs and made my first example. Out of the Playground section it was not obvious to me how to use the library. Therefore, I suggest to have a "hello world" example being included to the Playground section.
There is also some misleading information. You advice to use a code like this, but it does not work:
First, the import statement will lead to an error saying: import declarations may only appear at top level of a module
Then, the "const cropper = new Cropper('#image');" statement is wrong: should be instead "const cropper = new Cropper.default('#image', {});"
Therefore, I would suggest a simple hello world example where everything is put together correctly and is included in the playground section? I think this would help some people to get quicker started on your module.
Beta Was this translation helpful? Give feedback.
All reactions