Displaying the Full FileURL after Completed Upload in CKEditor
Question
When I use CKFinder (integrated in CKEditor) to upload or browser files, how can I get it to show the full FileURL in the inputbox?
That is, I want: http://www.mydomain.com/userfile/filename.ext
but not: /userfile/filename.ext
.
(I am using CKEditor.NET 3.6.2 and CKFinder 2.2.2 .)
Solution
Its very easy to create image picker using CKFinder !!! After integration just put this code to create Image Picker
<input type="text" name="n_thumb_url" id="n_thumb_url"/>
<input id="n_browseServer" value="Browse Server" type="button">
<script>
function SetFileField(fileUrl) {
jQuery('#n_thumb_url').val(fileUrl);
}
$("#n_browseServer").on("click", function(){
var finder = new CKFinder();
finder.basePath = 'http://localhost/integrated/ckfinder';
finder.selectActionFunction = SetFileField;
finder.popup();
});
</script>
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow