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

Defines the fluent API for configuring EditorPasteCleanupSettings

Definition

Namespace:Kendo.Mvc.UI.Fluent

Assembly:Kendo.Mvc.dll

Syntax:

C#
public class EditorPasteCleanupSettingsBuilder

Inheritance: objectEditorPasteCleanupSettingsBuilder

Inherited Members object.GetType()object.MemberwiseClone()object.ToString()object.Equals(object)object.Equals(object, object)object.ReferenceEquals(object, object)object.GetHashCode()...

Constructors

EditorPasteCleanupSettingsBuilder method.

C#
public EditorPasteCleanupSettingsBuilder(EditorPasteCleanupSettings container)
Parameters:containerEditorPasteCleanupSettings

Properties

Gets the settings being configured.

C#
protected EditorPasteCleanupSettings Container { get; }

Methods

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

C#
public EditorPasteCleanupSettingsBuilder All()
Returns:

EditorPasteCleanupSettingsBuilder

Returns the current EditorPasteCleanupSettingsBuilder instance.

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

C#
public EditorPasteCleanupSettingsBuilder All(bool value)
Parameters:valuebool

The value for All

Returns:

EditorPasteCleanupSettingsBuilder

Returns the current EditorPasteCleanupSettingsBuilder instance.

Example:
C#
@( Html.Kendo().Editor()
.Name("Editor")
.PasteCleanup(pasteCleanup => pasteCleanup.All(true))
)

Remove style and class attributes from the pasting content.

C#
public EditorPasteCleanupSettingsBuilder Css()
Returns:

EditorPasteCleanupSettingsBuilder

Returns the current EditorPasteCleanupSettingsBuilder instance.

Remove style and class attributes from the pasting content.

C#
public EditorPasteCleanupSettingsBuilder Css(bool value)
Parameters:valuebool

The value for Css

Returns:

EditorPasteCleanupSettingsBuilder

Returns the current EditorPasteCleanupSettingsBuilder instance.

Example:
C#
@( Html.Kendo().Editor()
.Name("Editor")
.PasteCleanup(pasteCleanup => pasteCleanup.Css(true))
)

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 EditorPasteCleanupSettingsBuilder Custom(Func<object, object> handler)
Parameters:handlerFunc<object, object>

The handler code wrapped in a text tag.

Returns:

EditorPasteCleanupSettingsBuilder

Returns the current EditorPasteCleanupSettingsBuilder instance.

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 EditorPasteCleanupSettingsBuilder Custom(string handler)
Parameters:handlerstring

The name of the JavaScript function that will be evaluated.

Returns:

EditorPasteCleanupSettingsBuilder

Returns the current EditorPasteCleanupSettingsBuilder instance.

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

C#
public EditorPasteCleanupSettingsBuilder KeepNewLines()
Returns:

EditorPasteCleanupSettingsBuilder

Returns the current EditorPasteCleanupSettingsBuilder instance.

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

C#
public EditorPasteCleanupSettingsBuilder KeepNewLines(bool value)
Parameters:valuebool

The value for KeepNewLines

Returns:

EditorPasteCleanupSettingsBuilder

Returns the current EditorPasteCleanupSettingsBuilder instance.

Example:
C#
@( Html.Kendo().Editor()
.Name("Editor")
.PasteCleanup(pasteCleanup =&gt; pasteCleanup.KeepNewLines(true))
)

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

C#
public EditorPasteCleanupSettingsBuilder MsAllFormatting()
Returns:

EditorPasteCleanupSettingsBuilder

Returns the current EditorPasteCleanupSettingsBuilder instance.

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

C#
public EditorPasteCleanupSettingsBuilder MsAllFormatting(bool value)
Parameters:valuebool

The value for MsAllFormatting

Returns:

EditorPasteCleanupSettingsBuilder

Returns the current EditorPasteCleanupSettingsBuilder instance.

Example:
C#
@( Html.Kendo().Editor()
.Name("Editor")
.PasteCleanup(pasteCleanup =&gt; pasteCleanup.MsAllFormatting(true))
)

Converts MS Word pasted content into HTML lists.

C#
public EditorPasteCleanupSettingsBuilder MsConvertLists(bool value)
Parameters:valuebool

The value for MsConvertLists

Returns:

EditorPasteCleanupSettingsBuilder

Returns the current EditorPasteCleanupSettingsBuilder instance.

Example:
C#
@( Html.Kendo().Editor()
.Name("Editor")
.PasteCleanup(pasteCleanup =&gt; pasteCleanup.MsConvertLists(true))
)

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

C#
public EditorPasteCleanupSettingsBuilder MsTags(bool value)
Parameters:valuebool

The value for MsTags

Returns:

EditorPasteCleanupSettingsBuilder

Returns the current EditorPasteCleanupSettingsBuilder instance.

Example:
C#
@( Html.Kendo().Editor()
.Name("Editor")
.PasteCleanup(pasteCleanup =&gt; pasteCleanup.MsTags(true))
)

Prevent any cleaning up of the content.

C#
public EditorPasteCleanupSettingsBuilder None()
Returns:

EditorPasteCleanupSettingsBuilder

Returns the current EditorPasteCleanupSettingsBuilder instance.

Prevent any cleaning up of the content.

C#
public EditorPasteCleanupSettingsBuilder None(bool value)
Parameters:valuebool

The value for None

Returns:

EditorPasteCleanupSettingsBuilder

Returns the current EditorPasteCleanupSettingsBuilder instance.

Example:
C#
@( Html.Kendo().Editor()
.Name("Editor")
.PasteCleanup(pasteCleanup =&gt; pasteCleanup.None(true))
)

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

C#
public EditorPasteCleanupSettingsBuilder Span()
Returns:

EditorPasteCleanupSettingsBuilder

Returns the current EditorPasteCleanupSettingsBuilder instance.

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

C#
public EditorPasteCleanupSettingsBuilder Span(bool value)
Parameters:valuebool

The value for Span

Returns:

EditorPasteCleanupSettingsBuilder

Returns the current EditorPasteCleanupSettingsBuilder instance.

Example:
C#
@( Html.Kendo().Editor()
.Name("Editor")
.PasteCleanup(pasteCleanup =&gt; pasteCleanup.Span(true))
)