New to Telerik UI for ASP.NET Core? Start a free 30-day trial

Kendo UI Editor TagHelper EditorTagHelper class.

Definition

Namespace:Kendo.Mvc.TagHelpers

Assembly:Kendo.Mvc.dll

Syntax:

C#
[HtmlTargetElement("kendo-editor")]
[HtmlTargetElement("richtexteditor-editor", ParentTag = "form-item")]
[RestrictChildren("ai", new string[] { "content", "deserialization", "immutables", "messages", "paste-cleanup", "pdf", "resizable", "serialization", "tools", "image-browser", "file-browser", "import", "export-as", "non-splittable-tags-on-paste" })]
public class EditorTagHelper : TagHelperBase, ITagHelper, ITagHelperComponent, IKendoFormEditor

Inheritance: objectTagHelperTagHelperBaseEditorTagHelper

Implements: IKendoFormEditorITagHelperITagHelperComponent

Inherited Members TagHelperBase.MinimumValidatorTagHelperBase.MaximumValidatorTagHelperBase.Init(TagHelperContext)TagHelperBase.Process(TagHelperContext, TagHelperOutput)TagHelperBase.GetInitializator()TagHelperBase.VerifySettings()TagHelperBase.SerializeTemplates()TagHelperBase.GenerateId(TagHelperOutput)TagHelperBase.CreateHandler(string)TagHelperBase.GetRangeValidationParameter<TValue>(ModelExplorer, string)TagHelperBase.ExtractEditFormat(string)TagHelperBase.ToDictionaryHandler(IDictionary<string, string>)TagHelperBase.AddSelfToTemplate(TagHelperContext)TagHelperBase.ViewContextTagHelperBase.GeneratorTagHelperBase.InitializerTagHelperBase.WriterTagHelperBase.ScriptAttributesTagHelperBase.NameTagHelperBase.IdTagHelperBase.SelectorTagHelperBase.IdPrefixTagHelperBase.IsInClientTemplateTagHelperBase.DeferredTagHelperBase.AsModuleTagHelper.Orderobject.GetType()object.MemberwiseClone()object.ToString()object.Equals(object)object.Equals(object, object)object.ReferenceEquals(object, object)object.GetHashCode()...

Example:

csharp
@addTagHelper *, Kendo.Mvc

    <kendo-editor name="editor">
		<tools>
               <tool name="bold" />
               <tool name="italic" />
               <tool name="underline" />
               <tool name="fontName" />
		</tools>
	</kendo-editor>

Constructors

Initializes a new instance of the EditorTagHelper class.

C#
public EditorTagHelper(IKendoHtmlGenerator generator)
Parameters:generatorIKendoHtmlGenerator

Properties

The content of the editor.

C#
[HtmlAttributeNotBound]
public string ContentString { get; set; }

Relaxes the same-origin policy when using the iframe-based editor. This is done automatically for all cases except when the policy is relaxed by document.domain = document.domain. In that case, this property must be used to allow the editor to function properly across browsers. This property has been introduced in internal builds after 2014.1.319.

C#
public string Domain { get; set; }

Indicates whether the Editor should submit encoded HTML tags. By default, the submitted value is encoded.

C#
public bool? Encoded { get; set; }

An expression to be evaluated against the current model.

C#
public ModelExpression For { get; set; }

The delay in milliseconds before the formatting marks are refreshed. This feature is useful for performance optimization as the formatting marks are re-rendered any time the user presses a key. If the user is typing very fast or holding down a key, the delay will prevent the re-rendering from being executed multiple times.The visual effect from this configuration is that the marks will briefly disappear while the user is typing. You can set the value to false to fully turn off this behavior.

C#
public double? FormattingMarksRefreshDelay { get; set; }

This property enables you to configure height for the Editor when the component is in inline mode.

C#
public double? InlineHeight { get; set; }

IsNested member.

C#
[HtmlAttributeNotBound]
public bool IsNested { get; set; }

Implements: IKendoFormEditor.IsNested

If set to true this configuration option would enable Tab-based navigation among Editor ToolBar items. By default navigation is arrow-based.

C#
public bool? NavigateOnTab { get; set; }

When strict CSP is enabled a nonce can be provided for the inline styles. The passed value would be used as the nonce attribute for the inline styles in the content area iframe, the placeholder inline style and the link tags loading external stylesheets in the content area.

C#
public string Nonce { get; set; }

The name of the JavaScript function that will handle the change event. Fires when Editor is blurred and its content has changed.

C#
public string OnChange { get; set; }

The name of the JavaScript function that will handle the execute event. Fires when an Editor command is executed.

C#
public string OnExecute { get; set; }

The name of the JavaScript function that will handle the keydown event. Fires when the user depresses a keyboard key. Triggered multiple times if the user holds the key down.

C#
public string OnKeydown { get; set; }

The name of the JavaScript function that will handle the keyup event. Fires when the user releases a keyboard key.

C#
public string OnKeyup { get; set; }

The name of the JavaScript function that will handle the paste event. Fires before the content is pasted in the Editor.

C#
public string OnPaste { get; set; }

The name of the JavaScript function that will handle the pdfExport event. Fired when the user clicks the "Export to PDF" toolbar button.

C#
public string OnPdfExport { get; set; }

The name of the JavaScript function that will handle the select event. Fires when the Editor selection has changed.

C#
public string OnSelect { get; set; }

The hint displayed by the widget when it is empty. Not set by default.

C#
public string Placeholder { get; set; }

Allows custom stylesheets to be included within the editing area. This setting is applicable only when the Editor is initialized from a textarea and a contenteditable iframe is generated.

C#
public string[] Stylesheets { get; set; }

The tag that will be rendered. Defaults to "textarea". Triggers the inline edit mode if different.

C#
public string Tag { get; set; }

When set to false, the decoration applied by the Formatting tool dropdown will be skipped and the values will appear as plain text options.

C#
public bool? UnsafeInline { get; set; }

The content of the editor.

C#
public string Value { get; set; }

Methods

Gets the initialization script.

C#
protected override string GetInitializationScript()
Returns:

string

The initialization script.

Overrides: TagHelperBase.GetInitializationScript()

C#
public override Task ProcessAsync(TagHelperContext context, TagHelperOutput output)
Parameters:contextTagHelperContextoutputTagHelperOutputReturns:

Task

Overrides: TagHelper.ProcessAsync(TagHelperContext, TagHelperOutput)

Serializes the defined settings.

C#
public override IDictionary<string, object> Serialize()
Returns:

IDictionary<string, object>

Overrides: TagHelperBase.Serialize()

SerializeEvents method.

C#
protected override Dictionary<string, object> SerializeEvents()
Returns:

Dictionary<string, object>

Overrides: TagHelperBase.SerializeEvents()

SerializeSettings method.

C#
protected override Dictionary<string, object> SerializeSettings()
Returns:

Dictionary<string, object>

Overrides: TagHelperBase.SerializeSettings()

TryAddAsEditor method.

C#
public bool TryAddAsEditor(TagHelperContext context)
Parameters:contextTagHelperContextReturns:

bool

The result.

Implements: IKendoFormEditor.TryAddAsEditor(TagHelperContext)

Writes the HTML output.

C#
protected override void WriteHtml(TagHelperOutput output)
Parameters:outputTagHelperOutput

The TagHelper output.

Overrides: TagHelperBase.WriteHtml(TagHelperOutput)