Shoumen Agdm Shoumen Agdm - 2 months ago 10
Javascript Question

CK Editor new plug in installation failed

I am using CKEditor v 4.5.11, I am trying to upload images from my local PC. For this reason I have already add a plugin named Upload Image. But in Image dialog it keeps remain same invisible with Image upload option, like
enter image description here

But, it need to be like
enter image description here

On my code section I have used

<script src="~/Content/CK/ckeditor/ckeditor.js"></script>
<script>
CKEDITOR.replace('TaskDescription'});
config.extraPlugins = 'imageuploader';
</script>


And providing a error in console like
enter image description here

How can I overcome this problem? Here
TaskDescriptin
is my
textarea
id

Answer

Try this if you build the upload Image with CK Editor

<script src="~/Content/CK/ckeditor/ckeditor.js"></script>            
    <script>
        CKEDITOR.replace('TaskDescription',{
        filebrowserImageBrowseUrl: 'YourController/YourAction',            
        filebrowserImageUploadUrl: 'YourController/YourAction'
        });        
  </script>

Or, if you added it manually then try this

<script>  
       CKEDITOR.config.extraPlugins = 'imageuploader';
       CKEDITOR.replace('TaskDescription',{
       filebrowserImageBrowseUrl: 'YourController/YourAction',            
       filebrowserImageUploadUrl: 'YourController/YourAction'
       });        
</script>
Comments