EditorPasteCleanupSettingsBuilder

Methods

All(System.Boolean)

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

Parameters

value - System.Boolean

The value for All

RETURNS

Returns the current EditorPasteCleanupSettingsBuilder instance.

Example

Razor
 
            @( Html.Kendo().Editor()
                .Name("Editor")
                .PasteCleanup(pasteCleanup => pasteCleanup.All(true))
            )
             

All()

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

RETURNS

Returns the current EditorPasteCleanupSettingsBuilder instance.

Example

Razor
 
            @( Html.Kendo().Editor()
                .Name("Editor")
                .PasteCleanup(pasteCleanup => pasteCleanup.All(true))
            )
             

Css(System.Boolean)

Remove style and class attributes from the pasting content.

Parameters

value - System.Boolean

The value for Css

RETURNS

Returns the current EditorPasteCleanupSettingsBuilder instance.

Example

Razor
 
            @( Html.Kendo().Editor()
                .Name("Editor")
                .PasteCleanup(pasteCleanup => pasteCleanup.Css(true))
            )
             

Css()

Remove style and class attributes from the pasting content.

RETURNS

Returns the current EditorPasteCleanupSettingsBuilder instance.

Example

Razor
 
            @( Html.Kendo().Editor()
                .Name("Editor")
                .PasteCleanup(pasteCleanup => pasteCleanup.Css(true))
            )
             

Custom(System.String)

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

Parameters

handler - System.String

The name of the JavaScript function that will be evaluated.

RETURNS

Returns the current EditorPasteCleanupSettingsBuilder instance.

Custom(System.Func)

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

Parameters

handler - System.Func<Object,Object>

The handler code wrapped in a text tag.

RETURNS

Returns the current EditorPasteCleanupSettingsBuilder instance.

KeepNewLines(System.Boolean)

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

Parameters

value - System.Boolean

The value for KeepNewLines

RETURNS

Returns the current EditorPasteCleanupSettingsBuilder instance.

Example

Razor
 
            @( Html.Kendo().Editor()
                .Name("Editor")
                .PasteCleanup(pasteCleanup => pasteCleanup.KeepNewLines(true))
            )
             

KeepNewLines()

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

RETURNS

Returns the current EditorPasteCleanupSettingsBuilder instance.

Example

Razor
 
            @( Html.Kendo().Editor()
                .Name("Editor")
                .PasteCleanup(pasteCleanup => pasteCleanup.KeepNewLines(true))
            )
             

MsAllFormatting(System.Boolean)

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

Parameters

value - System.Boolean

The value for MsAllFormatting

RETURNS

Returns the current EditorPasteCleanupSettingsBuilder instance.

Example

Razor
 
            @( Html.Kendo().Editor()
                .Name("Editor")
                .PasteCleanup(pasteCleanup => pasteCleanup.MsAllFormatting(true))
            )
             

MsAllFormatting()

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

RETURNS

Returns the current EditorPasteCleanupSettingsBuilder instance.

Example

Razor
 
            @( Html.Kendo().Editor()
                .Name("Editor")
                .PasteCleanup(pasteCleanup => pasteCleanup.MsAllFormatting(true))
            )
             

MsConvertLists(System.Boolean)

Converts MS Word pasted content into HTML lists.

Parameters

value - System.Boolean

The value for MsConvertLists

RETURNS

Returns the current EditorPasteCleanupSettingsBuilder instance.

Example

Razor
 
            @( Html.Kendo().Editor()
                .Name("Editor")
                .PasteCleanup(pasteCleanup => pasteCleanup.MsConvertLists(true))
            )
             

MsTags(System.Boolean)

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

Parameters

value - System.Boolean

The value for MsTags

RETURNS

Returns the current EditorPasteCleanupSettingsBuilder instance.

Example

Razor
 
            @( Html.Kendo().Editor()
                .Name("Editor")
                .PasteCleanup(pasteCleanup => pasteCleanup.MsTags(true))
            )
             

None(System.Boolean)

Prevent any cleaning up of the content.

Parameters

value - System.Boolean

The value for None

RETURNS

Returns the current EditorPasteCleanupSettingsBuilder instance.

Example

Razor
 
            @( Html.Kendo().Editor()
                .Name("Editor")
                .PasteCleanup(pasteCleanup => pasteCleanup.None(true))
            )
             

None()

Prevent any cleaning up of the content.

RETURNS

Returns the current EditorPasteCleanupSettingsBuilder instance.

Example

Razor
 
            @( Html.Kendo().Editor()
                .Name("Editor")
                .PasteCleanup(pasteCleanup => pasteCleanup.None(true))
            )
             

Span(System.Boolean)

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

Parameters

value - System.Boolean

The value for Span

RETURNS

Returns the current EditorPasteCleanupSettingsBuilder instance.

Example

Razor
 
            @( Html.Kendo().Editor()
                .Name("Editor")
                .PasteCleanup(pasteCleanup => pasteCleanup.Span(true))
            )
             

Span()

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

RETURNS

Returns the current EditorPasteCleanupSettingsBuilder instance.

Example

Razor
 
            @( Html.Kendo().Editor()
                .Name("Editor")
                .PasteCleanup(pasteCleanup => pasteCleanup.Span(true))
            )