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

Kendo UI pasteCleanup TagHelper EditorPasteCleanupSettingsTagHelper class.

Definition

Namespace:Kendo.Mvc.TagHelpers

Assembly:Kendo.Mvc.dll

Syntax:

C#
[HtmlTargetElement("paste-cleanup", ParentTag = "kendo-editor", TagStructure = TagStructure.WithoutEndTag)]
[HtmlTargetElement("paste-cleanup", ParentTag = "richtexteditor-editor", TagStructure = TagStructure.WithoutEndTag)]
[SuppressTagRendering]
public class EditorPasteCleanupSettingsTagHelper : TagHelperChildBase, ITagHelper, ITagHelperComponent

Inheritance: objectTagHelperTagHelperChildBaseEditorPasteCleanupSettingsTagHelper

Implements: ITagHelperITagHelperComponent

Inherited Members TagHelperChildBase.Init(TagHelperContext)TagHelperChildBase.AddSelfToContext(TagHelperContext)TagHelperChildBase.CreateHandler(string)TagHelperChildBase.IdPrefixTagHelper.Process(TagHelperContext, TagHelperOutput)TagHelper.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">
    <paste-cleanup all="true" />
</kendo-editor>

Constructors

Initializes a new instance of the EditorPasteCleanupSettingsTagHelper class.

C#
public EditorPasteCleanupSettingsTagHelper()

Properties

All HTML tags are stripped leaving only the text in the content.

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

Remove style and class attributes from the pasting content.

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

Use a callback function to integrate a custom implementation for cleaning up the paste content. Make sure the callback function always returns the result.

C#
public string Custom { get; set; }

Strip all HTML tags but keep new lines in the pasted content.

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

Remove all special formatting from MS Word content like font-name, font-size and MS Word specific tags.

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

Converts MS Word pasted content into HTML lists.

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

Removes all MS Word specific tags and cleans up the extra metadata.

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

Prevent any cleaning up of the content.

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

Remove all span elements from the content, ensuring much of the inline formatting is removed.

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

Methods

Adds the current TagHelper instance to its parent TagHelper.

C#
protected override void AddSelfToParent(TagHelperContext context)
Parameters:contextTagHelperContext

The TagHelper context.

Overrides: TagHelperChildBase.AddSelfToParent(TagHelperContext)

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

Task

Overrides: TagHelperChildBase.ProcessAsync(TagHelperContext, TagHelperOutput)

Serializes the defined settings.

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

Dictionary<string, object>