New to Kendo UI for AngularStart a free 30-day trial

Represents the Kendo UI Editor component for Angular.

Use the Editor to create and edit rich text content in your Angular applications.

Definition

Package:@progress/kendo-angular-editor

Selector:kendo-editor

Syntax:

html
<kendo-editor [(value)]="editorValue"></kendo-editor>

Inputs

When set to true or an ApplyToWordOptions object, emphasis or inline style commands apply to the whole word at the cursor.

Default:

false

disabled

boolean

Sets the disabled state of the component. To disable the Editor in reactive forms, see Forms Support.

iframe

boolean

If set to false, the Editor runs in non-encapsulated style mode. The Editor content inherits styles from the page.

Default:

true

Applies custom CSS styles to the Editor in iframe mode. Use this property to provide additional CSS for the Editor content.

Configures how pasted content is cleaned before it is added to the Editor (see example). Use this property to remove unwanted HTML, styles, or attributes from pasted content.

Sets the hint text displayed when the Editor is empty. Use this property to provide guidance to users.

Defines a function to customize the plugins used by the Editor. The function receives the default plugins and returns the plugins to use (see example).

preserveWhitespace

boolean | "full"

Controls whitespace handling in the Editor content. Set to true to preserve whitespace and normalize newlines to spaces. Set to 'full' to preserve all whitespace.

Default:

false

readonly

boolean

Sets the read-only state of the component.

When true, users cannot edit the content.

Default:

false

Determines whether the Editor can be resized (see example). Set to true or provide an object with resizing options.

Default:

false

schema

Schema​<any, any>

Provides a custom schema for the Editor (see example).

value

string

Sets the value of the Editor (see example). Use this property to update the Editor content programmatically.

Fields

Returns the text currently selected in the Editor (see example).

view

EditorView

Returns the ProseMirror EditorView object. Use this property to access the underlying EditorView instance.

Events

blur

EventEmitter​<undefined>

Fires when the Editor content area is blurred (see example).

focus

EventEmitter​<undefined>

Fires when the Editor content area receives focus (see example).

Fires when the user paste content into the Editor (see example). This event is preventable. If you cancel it, the Editor content does not change.

Fires when the Editor value changes due to user interaction. This event does not fire when the value changes programmatically through ngModel or form bindings (see example).

Methods

Manually blur the Editor.

Executes a command on the currently selected text (more information and example).

Parameters:commandNameEditorCommand

The command that will be executed.

attr?any

Optional parameters for the command.

Manually focus the Editor.

Opens a dialog.

Parameters:dialogNameDialogCommand

The name of the dialog that will open.