Class
TelerikEditor

The class for the Telerik Editor component.

Definition

Namespace:Telerik.Blazor.Components

Assembly:Telerik.Blazor.dll

Syntax:

cs-api-definition
public class TelerikEditor : TelerikInputBase<string>, IComponent, IHandleEvent, IHandleAfterRender, IDisposable

Inheritance: objectComponentBaseBaseComponentTelerikInputBase<string>TelerikEditor

Implements: IComponentIDisposableIHandleAfterRenderIHandleEvent

Inherited Members TelerikInputBase<string>.SetParametersAsync(ParameterView)TelerikInputBase<string>.OnInitializedAsync()TelerikInputBase<string>.Dispose()TelerikInputBase<string>.FocusAsync()TelerikInputBase<string>.CascadedEditContextTelerikInputBase<string>.FloatingLabelTelerikInputBase<string>.IdTelerikInputBase<string>.EnabledTelerikInputBase<string>.TabIndexTelerikInputBase<string>.ValueExpressionTelerikInputBase<string>.ValueChangedTelerikInputBase<string>.ValueTelerikInputBase<string>.OnChangeTelerikInputBase<string>.OnBlurTelerikInputBase<string>.AriaLabelTelerikInputBase<string>.AriaLabelledByTelerikInputBase<string>.AriaDescribedByTelerikInputBase<string>.ValidateOnTelerikInputBase<string>.InputModeBaseComponent.ShouldRender()BaseComponent.InitLocalizer()BaseComponent.ThrowIfParameterIsNull(object, string)BaseComponent.HaveOptionsChanged(IDictionary<string, object>, IDictionary<string, object>)BaseComponent.GetClassString(params string[])BaseComponent.InvokeAsync<T>(string, params object[])BaseComponent.InvokeAsync<T>(string, CancellationToken, params object[])BaseComponent.InvokeVoidAsync(string, params object[])BaseComponent.InvokeComponentMethodAsync<T>(string, params object[])BaseComponent.InvokeComponentMethodAsync<T>(string, CancellationToken, params object[])BaseComponent.InvokeVoidComponentMethodAsync(string, params object[])BaseComponent.InvokeComponentVoidMethodAsync(string, object)BaseComponent.InvokeDisposeAsync()BaseComponent.StateHasChanged()BaseComponent.RootComponentBaseComponent.ClassComponentBase.OnParametersSet()ComponentBase.OnAfterRender(bool)ComponentBase.InvokeAsync(Action)ComponentBase.InvokeAsync(Func<Task>)ComponentBase.DispatchExceptionAsync(Exception)

Constructors

TelerikEditor()

Declaration

cs-api-definition
public TelerikEditor()

Properties

Adaptive

Enables responsive toolbar behavior that automatically hides overflowing tools in a dropdown menu. When enabled, tools that don't fit in the available toolbar width are moved to an overflow popup. Useful for responsive designs where the editor width may vary across different screen sizes. Requires the toolbar to have sufficient space to display the overflow button. Default value is false.

Declaration

cs-api-definition
[Parameter]
public bool Adaptive { get; set; }

Property Value

bool

DebounceDelay

Sets the delay time in milliseconds before the ValueChanged event fires after user stops typing. Use this to control how frequently value changes are processed and improve performance. Higher values reduce frequency of updates, lower values provide more responsive updates. Example: 500 for half-second delay, 1000 for one-second delay. Default value is 100 milliseconds.

Declaration

cs-api-definition
[Parameter]
public int DebounceDelay { get; set; }

Property Value

int

EditMode

Controls how the editor content area is rendered and behaves. Iframe renders content in an isolated iframe for better security and styling control. Div renders content in a div element for easier CSS inheritance and styling. Default value is Iframe.

Declaration

cs-api-definition
[Parameter]
public EditorEditMode EditMode { get; set; }

Property Value

EditorEditMode

EditorCustomTools

Contains custom tool definitions for extending the Editor toolbar with application-specific functionality. Use EditorCustomTool components to define custom tools with their own rendering and behavior. Custom tools are referenced by name in the Tools collection to include them in the toolbar. Enables integration of custom buttons, dropdowns, or other UI elements directly in the Editor toolbar. Children: EditorCustomTool.

Declaration

cs-api-definition
[Parameter]
public RenderFragment EditorCustomTools { get; set; }

Property Value

RenderFragment

EditorSettings

Contains configuration settings that control Editor behavior and features. Use EditorPasteSettings to customize paste behavior, content cleaning, and formatting preservation. Use EditorAIPromptSettings and EditorInlineAIPromptSettings for AI integration settings. Settings provide fine-grained control over Editor functionality beyond basic parameters. Children: EditorPasteSettings, EditorAIPromptSettings, EditorInlineAIPromptSettings.

Declaration

cs-api-definition
[Parameter]
public RenderFragment EditorSettings { get; set; }

Property Value

RenderFragment

EnableAIPrompt

Enables AI Prompt integration to provide AI-powered content generation and editing assistance. When enabled, adds AI functionality to the Editor toolbar allowing users to generate, modify, and enhance content. Requires proper AI service configuration and EditorAIPromptSettings for customization. Use with EnableInlineAIPrompt for comprehensive AI editing experience. Default value is false.

Declaration

cs-api-definition
[Parameter]
public bool EnableAIPrompt { get; set; }

Property Value

bool

EnableInlineAIPrompt

Enables inline AI Prompt integration for contextual AI assistance directly within the content area. When enabled, users can select text and get AI suggestions in a popup near the selection. Provides immediate AI-powered text enhancement without opening separate dialogs. Requires proper AI service configuration and EditorInlineAIPromptSettings for customization. Use with EnableAIPrompt for comprehensive AI editing experience. Default value is false.

Declaration

cs-api-definition
[Parameter]
public bool EnableInlineAIPrompt { get; set; }

Property Value

bool

Height

Sets the height of the Editor component including toolbar and content area. Accepts CSS height values like pixels, percentages, or other CSS units. Use "400px" for fixed height, "100vh" for full viewport height, or "auto" for content-based sizing. Works together with Width to define the complete editor dimensions. Default value is "250px".

Declaration

cs-api-definition
[Parameter]
public string Height { get; set; }

Property Value

string

Plugins

Enables custom ProseMirror plugins by specifying the name of a global JavaScript function. Use this to extend editor functionality with custom plugins while maintaining all built-in features. The function receives arguments including getSchema, getView, ProseMirror objects, and getPlugins function. Must return an array of ProseMirror plugins that includes the default plugins for proper functionality. Example: "myCustomPluginsFunction" where window.myCustomPluginsFunction is defined globally.

Declaration

cs-api-definition
[Parameter]
public string Plugins { get; set; }

Property Value

string

ReadOnly

Controls whether the editor content is editable or read-only for users. When set to true, users can view and select content but cannot modify it. Use for displaying formatted content, creating preview modes, or temporarily preventing edits. Toolbar tools become disabled when read-only mode is active. Different from Enabled which disables all interactions including selection. Default value is false.

Declaration

cs-api-definition
[Parameter]
public bool ReadOnly { get; set; }

Property Value

bool

Schema

Enables custom ProseMirror schema by specifying the name of a global JavaScript function. Use this to modify the document structure and available content types in the editor. The function receives arguments including getSchema, getView, and ProseMirror objects. Must return a ProseMirror Schema class instance for proper editor functionality. Example: "myCustomSchemaFunction" where window.myCustomSchemaFunction is defined globally.

Declaration

cs-api-definition
[Parameter]
public string Schema { get; set; }

Property Value

string

SpellCheck

Sets the spellcheck behavior for the editor content area using the HTML spellcheck attribute. Use "true" to enable browser spell checking, "false" to disable it, or leave unset for browser default. Spell checking availability and behavior depends on the user's browser and system settings. See MDN spellcheck documentation for more details.

Declaration

cs-api-definition
[Parameter]
public string SpellCheck { get; set; }

Property Value

string

Tools

Defines the collection of editing tools available in the Editor toolbar. Use predefined tool sets like Default or All, or create custom tool collections. Tools include formatting (Bold, Italic), alignment, lists, links, images, and other editing features. Can be customized to include only specific tools needed for your use case. Default value is Default which includes essential editing tools.

Declaration

cs-api-definition
[Parameter]
public List<IEditorTool> Tools { get; set; }

Property Value

List<IEditorTool>

Width

Sets the width of the Editor component including toolbar and content area. Accepts CSS width values like pixels, percentages, or other CSS units. Use "100%" for full container width, "500px" for fixed width, or "auto" for content-based sizing. Works together with Height to define the complete editor dimensions.

Declaration

cs-api-definition
[Parameter]
public string Width { get; set; }

Property Value

string

Methods

BuildRenderTree(RenderTreeBuilder)

Declaration

cs-api-definition
protected override void BuildRenderTree(RenderTreeBuilder __builder)

Parameters

__builder

RenderTreeBuilder

Overrides ComponentBase.BuildRenderTree(RenderTreeBuilder)

ExecuteAsync(ToolCommandArgsBase)

Executes a specific editor command programmatically with the provided arguments. Use this to trigger editor operations like formatting, inserting content, or executing custom commands from code. Useful for implementing custom toolbar buttons, keyboard shortcuts, or automated content operations. Command execution updates the editor state and triggers appropriate events.

Declaration

cs-api-definition
public Task ExecuteAsync(ToolCommandArgsBase args)

Parameters

args

ToolCommandArgsBase

The command arguments specifying the operation to perform and its parameters.

Returns

Task

A task representing the asynchronous command execution.

OnAfterRenderAsync(bool)

Declaration

cs-api-definition
protected override Task OnAfterRenderAsync(bool firstRender)

Parameters

firstRender

bool

Returns

Task

Overrides BaseComponent.OnAfterRenderAsync(bool)

OnInitialized()

Declaration

cs-api-definition
protected override void OnInitialized()

Overrides ComponentBase.OnInitialized()

OnParametersSetAsync()

Declaration

cs-api-definition
protected override Task OnParametersSetAsync()

Returns

Task

Overrides TelerikInputBase<string>.OnParametersSetAsync()