You can place various DexExpress Blazor components inside an Edit Form to process/validate user input. In this example, an edit form is bound to a data source and includes the following components:
-
Text boxes
The Name, Address, and Phone text boxes are bound to corresponding data fields. -
Rich Text Editor
Displays the document whose path is specified in the Notes field. -
Buttons
The Next and Previous buttons allow users to navigate data records. The Save button saves changes to the bound data source.
You can place our Blazor Rich Text Editor component inside an Edit Form. To bind component content to a data field, use one of the following methods:
Follow the steps below:
- Assign the document's format to the DocumentFormat property.
- To open this document in our Blazor Rich Text Editor, assign the document's content as a byte array to the DocumentContent property. In this example, the component updates its content when a user clicks the Next or Previous button (when switching between data records).
- Write the DocumentContent property value back to the document to save changes.
If the Rich Text Editor does not support a given document's format, use third-party server libraries (such as the DevExpress Office File API) to convert the document from its original format to a supported format (and vice versa).
Our Blazor Rich Text Editor allows you to bind its content directly to a field that stores the document (assuming the document is in a supported format). To proceed with this implementation, follow the steps below:
- Assign the document's format to the DocumentFormat property.
- Bind the DocumentContent property to the field.
The control updates bound field values each time the DocumentContentChanged event occurs. Call the SaveDocumentAsync method to raise this event on-demand.
(you will be redirected to DevExpress.com to submit your response)