Form support

18 Nov 20181 minute to read

This below sample demonstrate how to get the Rich Text Editor value in button click.

To learn more about form support in the ASP.NET Core Rich Text Editor, watch this video:

Render the Rich Text Editor

Render the Rich Text Editor in form as below.

<form id="myForm" class="form-vertical">
<div class="form-group">
<ejs-richtexteditor id="default" showCharCount="true" maxLength="100"></ejs-richtexteditor>
<div id="dateError" style="padding-top: 10px"></div>
</div>
<div style="text-align: center">
<button id="validateSubmit" class="samplebtn e-control e-btn" type="submit" data-ripple="true">Submit</button>
<button id="resetbtn" class="samplebtn e-control e-btn" type="reset" data-ripple="true">Reset</button>
</div>
</form>

Obtain the Value

Upon submitting the form, getValue method will be triggered. Through the FormData class, Rich Text Editor value obtained as below.

See Also