This sample demonstrates the events that trigger on every action of the Rich Text Editor. The event details are showcased in the event trace panel.
The Rich Text Editor component is WYSIWYG ("what you see is what you get") editor that provides the best user experience to create and update the content. Users can format their content using standard toolbar commands.
Provides <IFRAME> and <DIV> modes
Capable of handling markdown editing.
Contains a modular library to load the necessary functionality on demand.
Provides a fully customizable toolbar.
Provides HTML view to edit the source directly for developers.
Supports third-party library integration.
Allows preview of modified content before saving it.
Handles images, hyperlinks, video, hyperlinks, uploads, etc.
Contains undo/redo manager.
Creates bulleted and numbered lists.
The Rich Text Editor triggers the events based on its actions. The events can be used as an extension point to perform custom operations. change - Triggers when the editor gets blurred and changes are made to the content. focus - Triggers when the editor is in focus. blur - Triggers when focused out of the editor. actionBegin - Triggers before the execution of command. actionComplete - Triggers after the execution of command. created - Triggers when the component is created. beforeDialogOpen – Event triggers when the dialog is being opened.. dialogOpen – Event triggers when a dialog is opened. dialogClose – Event triggers after the dialog has been closed. beforeQuickToolbarOpen – Event triggers when the quick toolbar is being opened. quickToolbarOpen – Event triggers when a quick toolbar is opened. quickToolbarClose – Event triggers after the quick toolbar has been closed. imageSelected – Event triggers when the image is selected or dragged into the insert image dialog imageUploading – Event triggers when the selected image begins to upload in the insert image dialog imageUploadSuccess – Event triggers when the image is successfully uploaded to the server side imageUploadFailed – Event triggers when there is an error in the image upload imageRemoving – Event triggers when the selected image is cleared from the insert image dialog destroyed – Triggers when the component is destroyed. beforeSanitizeHtml – Event triggers before sanitize the value. It's only applicable to editorMode as `HTML` resizing – Triggers only when resizing the image resizeStart –Triggers only when start resize the image resizeStop – Triggers only when stop resize the image Injecting Module The above features built as modules have to be included in your application. For example, to use image and link, inject the specific module using RichTextEditor.Inject (Toolbar, Link, Image, HtmlEditor).