I use CKEDITOR 4, in my ls:
CKEDITOR.replace('ae-textarea-text', {
filebrowserImageUploadUrl: '/Sites/UploadImgToSite?Site=' + $("#SiteName").val(),
height: 850,
width: 800
});
When I upload a images, parametr Site=' + $("#SiteName").val() - is empty, because
- 1) page open
- 2) CKEDITOR init with $("#SiteName").val() (now it empty)
- 3) user fill texbox #SiteName....
That parameter has to be available before CKEditor creation code is executed because it is no longer possible to change that parameter dynamically afterwards. It can only be set once when editor is created.
In your case you could try opening the page, getting
siteName
from user and only then creating the editor.