Class MetaTag
Represents a meta tag to be inserted into the iframe's head.
Inheritance
System.Object
MetaTag
Namespace: Syncfusion.Blazor.RichTextEditor
Assembly: Syncfusion.Blazor.dll
Syntax
public class MetaTag : Object
Constructors
MetaTag()
Declaration
public MetaTag()
Properties
Charset
Gets or sets the charset attribute of the meta tag, defining the character encoding for the document.
Declaration
public string Charset { get; set; }
Property Value
Type |
---|
System.String |
Examples
@using Syncfusion.Blazor.RichTextEditor;
<SfRichTextEditor>
<RichTextEditorIFrameSettings Enable="true" MetaTags="@metaTags" />
</SfRichTextEditor>
@code {
private List<MetaTag> metaTags = new List<MetaTag>()
{
new MetaTag { Charset = "UTF-8" },
};
}
Content
Gets or sets the content attribute of the meta tag, which holds the value of the meta information.
Declaration
public string Content { get; set; }
Property Value
Type |
---|
System.String |
Examples
@using Syncfusion.Blazor.RichTextEditor;
<SfRichTextEditor>
<RichTextEditorIFrameSettings Enable="true" MetaTags="@metaTags" />
</SfRichTextEditor>
@code {
private List<MetaTag> metaTags = new List<MetaTag>()
{
new MetaTag { Content = "This is a description" },
};
}
HttpEquiv
Gets or sets the http-equiv attribute of the meta tag, used to simulate an HTTP header.
Declaration
public string HttpEquiv { get; set; }
Property Value
Type |
---|
System.String |
Examples
@using Syncfusion.Blazor.RichTextEditor;
<SfRichTextEditor>
<RichTextEditorIFrameSettings Enable="true" MetaTags="@metaTags" />
</SfRichTextEditor>
@code {
private List<MetaTag> metaTags = new List<MetaTag>()
{
new MetaTag { HttpEquiv = "Content-Security-Policy", Content = "default-src 'self'" },
};
}
Name
Gets or sets the name attribute of the meta tag, used to specify the type of metadata (e.g., "description", "keywords").
Declaration
public string Name { get; set; }
Property Value
Type |
---|
System.String |
Examples
@using Syncfusion.Blazor.RichTextEditor;
<SfRichTextEditor>
<RichTextEditorIFrameSettings Enable="true" MetaTags="@metaTags" />
</SfRichTextEditor>
@code {
private List<MetaTag> metaTags = new List<MetaTag>()
{
new MetaTag { Name = "description" },
};
}
Property
Gets or sets the property attribute of the meta tag, often used for the Open Graph protocol to describe web content.
Declaration
public string Property { get; set; }
Property Value
Type |
---|
System.String |
Examples
@using Syncfusion.Blazor.RichTextEditor;
<SfRichTextEditor>
<RichTextEditorIFrameSettings Enable="true" MetaTags="@metaTags" />
</SfRichTextEditor>
@code {
private List<MetaTag> metaTags = new List<MetaTag>()
{
new MetaTag { Property = "og:title", Content = "Example Title" },
};
}