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>.ValidateOnBaseComponent.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.OnInitialized()ComponentBase.OnParametersSet()ComponentBase.OnAfterRender(bool)ComponentBase.InvokeAsync(Action)ComponentBase.InvokeAsync(Func<Task>)

Constructors

TelerikEditor()

Declaration

cs-api-definition
public TelerikEditor()

Properties

Adaptive

Specify if the toolbar should adapt and automatically hide and show the overflowing items a popup. Default value is false.

Declaration

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

Property Value

bool

DebounceDelay

Defines the debounce delay after which ValueChanged fires. Default value 100ms.

Declaration

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

Property Value

int

EditMode

Defines whether the editor should render iframe, or div for the content area.

Declaration

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

Property Value

EditorEditMode

EditorCustomTools

Defines the container of custom tool renderings. EditorCustomTool.

Declaration

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

Property Value

RenderFragment

EditorSettings

Defines the container of editor settings. EditorPasteSettings.

Declaration

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

Property Value

RenderFragment

Height

Defines the height of the Editor. Default value 250px.

Declaration

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

Property Value

string

Plugins

The name of the JS function declared in the global scope (window object) that will be used to provide custom ProseMirror plugins. The function accepts an arguments object with the following properties:

  1. getSchema - a function that returns the current schema object. Before the editor is initialized, the schema is the default schema. After the editor is initialized, the schema is the current schema.
  2. getView - a function that returns the currently used instance of EditorView object. Before the editor is initialized, the view (the result of the function) is null.
  3. ProseMirror - object that contains various ProseMirror classes and functions.
  4. getPlugins - function that accepts schema as an argument and returns the default Telerik Editor plugins.

The function should return an array of ProseMirror plugins. Note: To ensure all the built-in functionalities of the Telerik Editor are working correctly, the result array should contain the default plugins which can be recieved by calling the getPlugins function.

Declaration

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

Property Value

string

ReadOnly

The parameter is used to specify if the input field should be read-only. When set to true, the input becomes non-editable.

Declaration

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

Property Value

bool

Schema

The name of the JS function declared in the global scope (window object) that will be used to provide custom ProseMirror schema. The function accepts an arguments object with the following properties:

  1. getSchema - a function that returns the current schema object. Before the editor is initialized, the schema is the default schema. After the editor is initialized, the schema is the current schema.
  2. getView - a function that returns the currently used instance of EditorView object. Before the editor is initialized, the view (the result of the function) is null.
  3. ProseMirror - object that contains various ProseMirror classes and functions.

The function should return an instance of the ProseMirror Schema class.

Declaration

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

Property Value

string

SpellCheck

Defines the spellcheck HTML attribute of the editable container in the component. Support and behavior depends on the user environment.

Declaration

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

Property Value

string

Tools

Defines the default Tools collection. Default value Default.

Declaration

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

Property Value

List<IEditorTool>

Width

Defines the width of the Editor.

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)

Declaration

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

Parameters

args

ToolCommandArgsBase

Returns

Task

OnAfterRenderAsync(bool)

Declaration

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

Parameters

firstRender

bool

Returns

Task

Overrides BaseComponent.OnAfterRenderAsync(bool)

OnParametersSetAsync()

Declaration

cs-api-definition
protected override Task OnParametersSetAsync()

Returns

Task

Overrides TelerikInputBase<string>.OnParametersSetAsync()