Class RichTextEditorPasteCleanupSettings
The class is used to configure paste related settings in the Rich Text Editor.
Inheritance
Namespace: Syncfusion.Blazor.RichTextEditor
Assembly: Syncfusion.Blazor.dll
Syntax
public class RichTextEditorPasteCleanupSettings : OwningComponentBase
Constructors
RichTextEditorPasteCleanupSettings()
Declaration
public RichTextEditorPasteCleanupSettings()
Properties
AllowedStyleProperties
Gets or sets the list of allowed CSS style attributes when pasting in to the editor.
Declaration
public string[] AllowedStyleProperties { get; set; }
Property Value
Type | Description |
---|---|
System.String[] | The value is an array of string type. |
Remarks
Allows only a provided list of CSS style attributers. Others will be removed from the pasted tags.
Examples
@using Syncfusion.Blazor.RichTextEditor;
<SfRichTextEditor>
<RichTextEditorPasteCleanupSettings AllowedStyleProperties="@AllowedStyles"/>
</SfRichTextEditor>
@code {
private string[] AllowedStyles = new string[] { "color", "font-size" };
}
DeniedAttributes
Gets or sets the list of CSS style attributes that are removed with their content when pasting text into the editor.
Declaration
public string[] DeniedAttributes { get; set; }
Property Value
Type | Description |
---|---|
System.String[] | The value is an array of string type. |
Remarks
Restrict the provided list of arrributes alone when pasting text into the editor.
Examples
@using Syncfusion.Blazor.RichTextEditor;
<SfRichTextEditor>
<RichTextEditorPasteCleanupSettings DeniedAttributes="@DeniedList"/>
</SfRichTextEditor>
@code {
private string[] DeniedList = new string[] { "class", "title", "id" };
}
DeniedTags
Gets or sets the list of HTML tags that are removed with their content when pasting text into the editor.
Declaration
public string[] DeniedTags { get; set; }
Property Value
Type | Description |
---|---|
System.String[] | The value is an array of string type. |
Remarks
Restrict the provided list of tags alone when pasting text into the editor.
Examples
@using Syncfusion.Blazor.RichTextEditor;
<SfRichTextEditor>
<RichTextEditorPasteCleanupSettings DeniedTags="@DeniedTagList"/>
</SfRichTextEditor>
@code {
private string[] DeniedTagList = new string[] { "a", "a[!href]" };
}
KeepFormat
Gets or sets whether to keep or remove the format in the copied content when pasting into the editor.
Declaration
public bool KeepFormat { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
|
PlainText
Gets or sets whether to remove text formatting when pasting content into the editor.
Declaration
public bool PlainText { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
|
Prompt
Gets or sets whether to show modal dialog to choose if to keep or clean the formatting in the copied content.
Declaration
public bool Prompt { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
|
Methods
Dispose(Boolean)
Dispose unmanaged resources in the Syncfusion Blazor component.
Declaration
protected override void Dispose(bool disposing)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | disposing | Boolean value to dispose the object. |
OnInitializedAsync()
Method invoked when the component is ready to start.
Declaration
protected override Task OnInitializedAsync()
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task | A System.Threading.Tasks.Task representing any asynchronous operation. |
OnParametersSetAsync()
Method invoked when the component has received parameters from its parent.
Declaration
protected override Task OnParametersSetAsync()
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task | A System.Threading.Tasks.Task representing any asynchronous operation. |