I have created a custom image uploader page.
To make it really simple for the user, i am trying to set the size of the image rather than them have to resize for a thumbnail.
The image retains its original size and the CKEditor image popup should have the size (height/width) set .
I have found the code for this and boils down to the following
So basically, it sets the txtUrL, and then sets the width and height.
This was working initially, and still works first time for some images on my machine, but then others, it doesnt work, and the original dimensions are in the height and width text boxes.
By simply repeating the image selection a second time then the correct height and width are set.
So why would the above code work the second time around and how can i get this sorted.
To make it really simple for the user, i am trying to set the size of the image rather than them have to resize for a thumbnail.
The image retains its original size and the CKEditor image popup should have the size (height/width) set .
I have found the code for this and boils down to the following
window.top.opener.CKEDITOR.dialog.getCurrent().setValueOf('info', 'txtUrl', encodeURI(contentDirectory + list.val())); window.top.opener.CKEDITOR.dialog.getCurrent().setValueOf('info', 'txtHeight', height); window.top.opener.CKEDITOR.dialog.getCurrent().setValueOf('info', 'txtWidth', width); window.top.close(); window.top.opener.focus();
So basically, it sets the txtUrL, and then sets the width and height.
This was working initially, and still works first time for some images on my machine, but then others, it doesnt work, and the original dimensions are in the height and width text boxes.
By simply repeating the image selection a second time then the correct height and width are set.
So why would the above code work the second time around and how can i get this sorted.
Re: SetValueOf txtHeight txtWidth not working until second t