ClassEditorPasteSettings
The class for the paste settings of the Editor component.
Definition
Namespace:Telerik.Blazor.Components
Assembly:Telerik.Blazor.dll
Syntax:
public class EditorPasteSettings : ComponentBase, IComponent, IHandleEvent, IHandleAfterRender
Inheritance: objectComponentBaseEditorPasteSettings
Implements:
Inherited Members
Constructors
EditorPasteSettings()
Declaration
public EditorPasteSettings()
Properties
ConvertMsLists
Controls whether Microsoft Word list formatting is automatically converted to proper HTML list elements. When enabled, pasted Word lists become standard HTML ul/ol elements for consistent rendering. Improves compatibility and ensures list formatting works correctly across different browsers. Recommended to keep enabled for better content consistency and accessibility. Default value is true.
Declaration
[Parameter]
public bool ConvertMsLists { get; set; }
Property Value
RemoveAllAttributes
Controls whether all HTML attributes are stripped from pasted content for maximum cleanliness. When enabled, removes all attributes including classes, styles, IDs, and other properties from HTML elements. Takes precedence over RemoveAttributes, RemoveMsClasses, and RemoveMsStyles. Use for scenarios requiring clean, attribute-free HTML output or high security requirements. Default value is false.
Declaration
[Parameter]
public bool RemoveAllAttributes { get; set; }
Property Value
RemoveAttributes
Specifies specific HTML attributes to be removed from pasted content for selective cleaning. Allows fine-grained control over which attributes are preserved and which are removed. Example: new List<string> { "id", "onclick", "data-custom" } removes specific unwanted attributes. Ignored when RemoveAllAttributes is enabled. Use for targeted content sanitization.
RemoveHtmlComments
Controls whether HTML comments are removed from pasted content for cleaner output. When enabled, removes developer comments and other HTML comment blocks that aren't needed in the editor. Helps reduce content size and removes potentially sensitive information from pasted content. Recommended for production environments where content cleanliness is important. Default value is false.
Declaration
[Parameter]
public bool RemoveHtmlComments { get; set; }
Property Value
RemoveMsClasses
Controls whether Microsoft Office CSS classes are automatically removed from pasted content. When enabled, removes classes starting with "Mso" that are generated by Microsoft Word and other Office applications. Improves content cleanliness and prevents Office-specific styling from affecting editor appearance. Recommended to keep enabled for consistent formatting across different content sources. Default value is true.
Declaration
[Parameter]
public bool RemoveMsClasses { get; set; }
Property Value
RemoveMsStyles
Controls whether Microsoft Office inline styles are automatically removed from pasted content. When enabled, removes style attributes starting with "mso" that are generated by Microsoft Word and other Office applications. Improves content cleanliness and prevents Office-specific styling from conflicting with editor styles. Recommended to keep enabled for consistent formatting and better visual integration. Default value is true.
Declaration
[Parameter]
public bool RemoveMsStyles { get; set; }
Property Value
StripTags
Specifies HTML tags to be completely removed from pasted content including their content. Use this to block unwanted elements like scripts, forms, or other tags that shouldn't appear in the editor. Example: new List<string> { "script", "form", "iframe" } removes security risks and unsupported elements. Works together with RemoveAllAttributes for comprehensive content cleaning.
Methods
BuildRenderTree(RenderTreeBuilder)
Declaration
protected override void BuildRenderTree(RenderTreeBuilder __builder)
Parameters
__builder
Overrides
SetParametersAsync(ParameterView)
Declaration
public override Task SetParametersAsync(ParameterView parameters)
Parameters
parameters
Returns
Overrides