This example adds a custom Final Save button to our Blazor Rich Text Editor's File tab. When a user clicks this button, the control executes the following:
- Updates fields in an open document.
- Clears the content of the first section's header.
- Adds an image to the header.
- Saves the open document.
The CustomizeRibbon event allows you to access and customize the Rich Text Editor's built-in ribbon UI. Call the AddCustomButton method in the event handler to add a custom button to the ribbon. The method's click
parameter sets this button's Click event handler.
Initiate one of the following to enable save operations within the DevExpress Rich Text Editor:
- Handle the DocumentContentChanged event.
- Implement two-way data binding between the DocumentContent property and a data field.
Use the Modified property to check whether an open document has unsaved changes. Depending on the property value, enable or disable the custom button. In its Click
event handler, call the SaveDocumentAsync method to raise the DocumentContentChanged
event and save changes.
(you will be redirected to DevExpress.com to submit your response)