Hi,
I'm currently building a form which includes some basic text inputs and a RTF editor. I use the KendoReact Editor to offer the cool control with nice copy and paste and formatting options.
I understand from your documentation that this control does not support Html5 form validation. In particular, I need to make this rte field required. As the rest of the form follows the html5 form validation (with all the nice UI hints if you try to submit) I'm looking for a way to accomplish the same with the Editor control. Has anyone accomplished this before?
6 Answers, 1 is accepted
Hello, Ruud,
Currently, this can be achieved by programmatically checking the Editor content and setting class name that will make it look invalid.
I made an example that will add the invalid when to the Editor when in it empty on a button click:
https://stackblitz.com/edit/react-ah55ht?file=index.html
I hope this proves helpful.
Regards,
Stefan
Progress Telerik
Hi Stefan,
Thanks for your quick reply. I do know how to add classes and prevent submission of the form via a custom method; but i would like to use this control the same as the input, where a Required attribute on the input tag is enough for the html5 validation to work, which includes the validation messages and will prevent the form submission as well.
I read this is not supported by the Editor control, so i was just wandering if there is a work around. I guess for now I need to stick to my current approach.
Regards,
Ruud
Hello, Ruud,
Thank you for the feedback.
I discussed this with the Editor lead developer and the Form developer. We have some ideas in mind and we may be able to offer a nicer integration between the Editor and Form.
As our planning is dynamic, we will have this in mind, and when we have an official result, I will post it here.
Regards,
Stefan
Progress Telerik
Hi Stefan,
That would be great, I really appreciate the way you guys are thinking with your user base in mind. Thanks!
Regards,
Ruud
Hi Stefan,
We want to know whether there is any update with the required property for Editor control.
Regards,
Sanjay
Hello, Sanjay,
Currently, the required property is still not added.
We are working on tasks based on community interest and priority.
Thank you for sharing your interest in this as it will increase its priority.
Regards,
Stefan
Progress Telerik
Our thoughts here at Progress are with those affected by the outbreak.