Class RichTextEditorIFrameSettings
A class used for configuring the IFrame rendring properties in the SfRichTextEditor.
Inheritance
Namespace: Syncfusion.Blazor.RichTextEditor
Assembly: Syncfusion.Blazor.dll
Syntax
public class RichTextEditorIFrameSettings : OwningComponentBase
Constructors
RichTextEditorIFrameSettings()
Declaration
public RichTextEditorIFrameSettings()
Properties
Attributes
Gets or sets a collection of additional attributes to be added in the iframe element for customization.
Declaration
public Dictionary<string, object> Attributes { get; set; }
Property Value
Type |
---|
System.Collections.Generic.Dictionary<System.String, System.Object> |
Examples
In the below code example, enable the iframe spellcheck and autocorrect attributes.
@using Syncfusion.Blazor.RichTextEditor;
<SfRichTextEditor>
<RichTextEditorIFrameSettings Enable="true" Attributes="IframeAttributes"/>
</SfRichTextEditor>
@code {
private Dictionary<string, object> IframeAttributes = new Dictionary<string, object>() {
{"spellcheck", "true" },
{"autocorrect", "on"}
}
}
Enable
Gets or sets the editor content will be render in an iframe and isolated from the rest of the page.
Declaration
public bool Enable { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
|
Resources
Gets or sets the resources for injecting the styles and scripts into the iframe element.
Declaration
public ResourcesModel Resources { get; set; }
Property Value
Type | Description |
---|---|
ResourcesModel |
Examples
In the following code example, the external style and script files are added in the iframe body element.
@using Syncfusion.Blazor.RichTextEditor;
<SfRichTextEditor>
<RichTextEditorIFrameSettings Enable="true" Resources="NewResources" />
</SfRichTextEditor>
@code {
private ResourcesModel NewResources { get; set; } = new ResourcesModel()
{
Styles = new string[] { "/styles.css" },
Scripts = new string[] { "/script.js" }
};
}
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. |