Opened 11 years ago
Closed 10 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: |
Description
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)
Change History (5)
comment:1 Changed 11 years ago by
Changed 10 years ago by
Attachment: | validator.aspx added |
---|
comment:2 Changed 10 years ago by
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>
?
comment:3 Changed 10 years ago by
Status: | new → pending |
---|
comment:4 Changed 10 years ago by
Resolution: | → expired |
---|---|
Status: | pending → closed |
A quick fix is to override Page_ClientValidate
and loop through the instances and call updateElement