javascript - ckeditor image by jquery display -
hi guys trying insert fileurl display image in ckeditor how edit codes that? razor cshtml
</script> @html.textareafor(model => model.questioncontent, new { @id = "ckecontent" }) <script type="text/javascript"> ckeditor.replace( "ckecontent" ) </script>
my codes able display url, want display image help??
$(function() { $("#browser").click(function() { var ckfinder = new ckfinder(); ckfinder.selectactionfunction = function ( fileurl ) { $( '#imagediv' ).html(''); var img = new image(); $( img ).attr( 'src', '' + fileurl ).appendto( $( '#imagediv' ) ).fadein(); $( img ).attr( 'width', '' + fileurl ) $( img ).attr( 'height', '' + fileurl ) ckeditor.instances.ckecontent.inserthtml( fileurl ); </script>
Comments
Post a Comment