Example of API in Angular Rich Text Editor Component

This sample demonstrate the usage of API in Rich Text Editor, use the properties panel to change the maximum length, read only mode, disable status, to get value, enable HTML encode, select all content and get selected HTML from the Rich Text Editor.

Properties
Maximum Length
ReadOnly
Enabled
Enable Html Encode
Description

In this demos, Ensuring the API'S behavious by doing

  • Change the value of maxLength textbox to change maximum Length of character.
  • Click the readOnly check box to enable/disable editable and non-editable mode of the RTE.
  • Click the enabled check box to enable/disable the RTE component.
  • Click the enableHtmlEncode check box to enableHtmlEncode/disableHtmlEncode the RTE component.
  • Click the getValue button which shows the RTE values in the alert window.
  • Click the getSelection button which shows the selectedText in the alert window.
  • Click the selectAll button selecting all text content in the RTE.

Injecting Module

Rich Text Editor features are segregated into individual feature-wise modules. In this demo we have used following injectable services ToolbarService, LinkService, ImageService, HtmlEditorService, CountService, QuickToolbarService, PasteCleanupService into the @NgModule.providers section.