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 #1

Open
ygmr1 opened this issue Oct 20, 2016 · 5 comments
Open

How to use #1

ygmr1 opened this issue Oct 20, 2016 · 5 comments

Comments

@ygmr1
Copy link

ygmr1 commented Oct 20, 2016

can you explain how to use and configure?

@anndoc
Copy link
Owner

anndoc commented Oct 20, 2016

I tested this package with django and django-ckeditor in readme there is the config for django settings. You will need put image-crop directory into ckeditor plugins directory. If you planning use it without django you will need add the same options as in readme in ckeditor-init.js but I didn't test it.

@ygmr1
Copy link
Author

ygmr1 commented Oct 21, 2016

i get error on imagecrop.js when i click edit image on this line:

cropper.reset().replace(element.getAttribute('src'));
Cannot read property 'reset' of undefined

@anndoc
Copy link
Owner

anndoc commented Oct 21, 2016

I'll check this, but at first sight it seems error with cropper.js script. Could you please share your config?

@ygmr1
Copy link
Author

ygmr1 commented Oct 21, 2016

i don't have any js-file named cropper.js

My config.js :
CKEDITOR.editorConfig = function (config) {
config.extraPlugins = 'imagecrop';
....
}

i added what you describe on readme to imagecrop.js.
`CKEDITOR.dialog.add('cropDialog', function (editor) {
var cropper,
imageType = 'image/jpeg',
width = parseInt(window.innerWidth * 80 / 100),
height = parseInt(window.innerHeight * 80 / 100),
options = {
'aspectRatio': 16 / 9,
'autoCropArea': 1,
'cropBoxResizable': 'False',
'dragMode': 'move',
'background': 'False'
},

Sorry for my english

@anndoc
Copy link
Owner

anndoc commented Nov 19, 2016

I've updated readme, now it's more clear. Please, check your config one more time.

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

No branches or pull requests

2 participants