Opened 10 years ago

Closed 9 years ago

#11278 closed Bug (expired)

ASP.NET validation does not read the right value of CKEditor

Reported by: OHDev Owned by:
Priority: Normal Milestone:
Component: Server : ASP.Net Version: 4.3
Keywords: Cc:


I'm using ASP.NET wrapper for CKEditor. I use a RequiredFieldValidator for the control, but the first time the control gets validated, it returns the Initial text of ckEditor

so let's say the editor had a value of '1234' and I replace it by 'qwerty' when I submit the form and before the postback, in ASP.NET's JS validation functions, the value is still the old one 1234, while getData() returns the right value!

if I call updateElement() the value is returned allright, but I want a way to do this automatically.

I can override Page_ClientValidate to loop into all instances and call updateElement, but is there a better way?

PS: how can I loop through all Instances, foreach , for loop does not work with CKEDITOR.instances

Attachments (1)

validator.aspx (1.5 KB) - added by Wiktor Walc 10 years ago.

Download all attachments as: .zip

Change History (5)

comment:1 Changed 10 years ago by OHDev

A quick fix is to override Page_ClientValidate

and loop through the instances and call updateElement

for (var i in CKEDITOR.instances) {

(function (i) {




Changed 10 years ago by Wiktor Walc

Attachment: validator.aspx added

comment:2 Changed 10 years ago by Wiktor Walc

Apologies for taking so long to check this. I'm unable to reproduce the reported issue using the attached sample. Can you update the attached sample so that we could reproduce it on our end?

Is it possible that you did not use the ASP.NET integration and <CKEditor:CKEditorControl>, but instead you have used the JavaScript API to enable CKEditor on <asp:TextBox>?

Last edited 10 years ago by Wiktor Walc (previous) (diff)

comment:3 Changed 10 years ago by Wiktor Walc

Status: newpending

comment:4 Changed 9 years ago by Jakub Ś

Resolution: expired
Status: pendingclosed
Note: See TracTickets for help on using tickets.
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy