Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

174
Views
ckeditor uploadimage plugin base64 not replaced with url

I am using CKEditor for a textarea for a Web Forms web app in .NET C#, and some users paste images inside the textarea, that results in lot of informations saved, that sometmes generates loading error, because of the length of the base64 content of the image. So I am trying to use the uploadimage CKEditor plugin Here I configured the plugin in the editor configuration in my script

var edit1 = CKEDITOR.replace('txtDescription',
    {
        language: editorlang,
        customConfig: 'config_basic.js',
        height: '100px',
        extraPlugins: 'uploadimage',
        uploadUrl: 'uploadHandler.ashx?upload_type=ticket_img&codeSiteId=' + $('#hfCODE_SITEID').val()
    });

In the C# method of uploadHandler called, the image is correctly uploaded, but when the method returns, in the editor I always see the base64 string when I look the image properties, and not the generated URL. I saw on the plugin documentation that the server method has to return a JSON, so I tried creating a JSON

string _atchHTML = "{\n " +
"    \"uploaded\": 1,\n" +
"    \"fileName\": \"" + fileName + "\",\n" +
"    \"url\": \"" + src  + "\"\n" +
"}";

but it dosn't work, and from other responses I tried with a javascript function

string _atchHTML = "<script type='text/javascript'>window.parent.CKEDITOR.tools.callFunction("+ IdAttach + ",'" + src + "','" + fileName + "');</script>";

but it still doesn't work, and I see an error in the console browser

Uncaught TypeError: el.find is not a function

What am I doing wrong? Thanks

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!