ClassTelerikEditor
The class for the Telerik Editor component.
Definition
Namespace:Telerik.Blazor.Components
Assembly:Telerik.Blazor.dll
Syntax:
public class TelerikEditor : TelerikInputBase<string>, IComponent, IHandleEvent, IHandleAfterRender, IDisposable
Inheritance: objectComponentBaseBaseComponentTelerikInputBase<string>TelerikEditor
Implements:
Inherited Members
Constructors
TelerikEditor()
Declaration
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.
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.
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
[Parameter]
public EditorEditMode EditMode { get; set; }
Property Value
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
[Parameter]
public RenderFragment EditorCustomTools { get; set; }
Property Value
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
[Parameter]
public RenderFragment EditorSettings { get; set; }
Property Value
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
[Parameter]
public bool EnableAIPrompt { get; set; }
Property Value
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
[Parameter]
public bool EnableInlineAIPrompt { get; set; }
Property Value
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".
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.
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.
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.
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
[Parameter]
public string SpellCheck { get; set; }
Property Value
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
[Parameter]
public List<IEditorTool> Tools { get; set; }
Property Value
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.
Methods
BuildRenderTree(RenderTreeBuilder)
Declaration
protected override void BuildRenderTree(RenderTreeBuilder __builder)
Parameters
__builder
Overrides
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
public Task ExecuteAsync(ToolCommandArgsBase args)
Parameters
args
The command arguments specifying the operation to perform and its parameters.
Returns
A task representing the asynchronous command execution.
OnInitialized()
Declaration
protected override void OnInitialized()
Overrides