EditorTagHelper
Kendo UI Editor TagHelper EditorTagHelper class.
Definition
Namespace:Kendo.Mvc.TagHelpers
Assembly:Kendo.Mvc.dll
Syntax:
[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:
Inherited Members
Example:
@addTagHelper *, Kendo.Mvc
<kendo-editor name="editor">
<tools>
<tool name="bold" />
<tool name="italic" />
<tool name="underline" />
<tool name="fontName" />
</tools>
</kendo-editor>
Child Tags
Constructors
Initializes a new instance of the EditorTagHelper class.
Properties
The content of the editor.
[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.
public string Domain { get; set; }
Indicates whether the Editor should submit encoded HTML tags. By default, the submitted value is encoded.
public bool? Encoded { get; set; }
An expression to be evaluated against the current model.
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.
public double? FormattingMarksRefreshDelay { get; set; }
This property enables you to configure height for the Editor when the component is in inline mode.
public double? InlineHeight { get; set; }
IsNested member.
[HtmlAttributeNotBound]
public bool IsNested { get; set; }
Implements:
If set to true this configuration option would enable Tab-based navigation among Editor ToolBar items. By default navigation is arrow-based.
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.
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.
public string OnChange { get; set; }
The name of the JavaScript function that will handle the execute event. Fires when an Editor command is executed.
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.
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.
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.
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.
public string OnPdfExport { get; set; }
The name of the JavaScript function that will handle the select event. Fires when the Editor selection has changed.
public string OnSelect { get; set; }
The hint displayed by the widget when it is empty. Not set by default.
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.
public string[] Stylesheets { get; set; }
The tag that will be rendered. Defaults to "textarea". Triggers the inline edit mode if different.
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.
public bool? UnsafeInline { get; set; }
Methods
Gets the initialization script.
protected override string GetInitializationScript()
The initialization script.
Overrides:
public override Task ProcessAsync(TagHelperContext context, TagHelperOutput output)
Overrides:
Serializes the defined settings.
public override IDictionary<string, object> Serialize()
Overrides:
SerializeEvents method.
protected override Dictionary<string, object> SerializeEvents()
Overrides:
SerializeSettings method.
protected override Dictionary<string, object> SerializeSettings()
Overrides:
TryAddAsEditor method.
public bool TryAddAsEditor(TagHelperContext context)
The result.
Implements:
Writes the HTML output.
protected override void WriteHtml(TagHelperOutput output)
The TagHelper output.
Overrides: