Class ParagraphBlockSettings
Represents settings specific to a paragraph block used in the SfBlockEditor.
Inherited Members
Namespace: Syncfusion.Blazor.BlockEditor
Assembly: Syncfusion.Blazor.dll
Syntax
public class ParagraphBlockSettings : BlockSettings
Remarks
Assign an instance of this settings class to BlockModel.Properties when BlockModel.BlockType is
Paragraph. This class controls the behavior and appearance of paragraph blocks within the editor.
Configure the optional Placeholder property to guide users when a paragraph block contains no content. The placeholder text provides contextual hints about what content should be entered, improving the user experience.
Extend this class with additional properties as needed for your application, such as text alignment, line height, or custom styling options specific to your implementation.
Examples
The following example demonstrates how to create a paragraph block with paragraph-specific settings and configure a placeholder for empty content guidance using the SfBlockEditor component.
<SfBlockEditor @bind-Blocks="@BlogContent">
<!-- Paragraph block with settings -->
</SfBlockEditor>
@code {
private List<BlockModel> BlogContent = new()
{
new BlockModel
{
ID = "intro-block",
BlockType = BlockType.Paragraph,
Indent = 0,
CssClass = "intro-paragraph",
Properties = new ParagraphBlockSettings
{
Placeholder = "Start typing your introduction here..."
},
Content = new List<ContentModel>
{
new ContentModel
{
ID = "intro-content",
ContentType = ContentType.Text,
Content = "",
Properties = new TextContentSettings
{
Styles = new StyleModel()
},
StylesApplied = new List<string>()
}
}
}
};
}
Constructors
ParagraphBlockSettings()
Declaration
public ParagraphBlockSettings()
Properties
Placeholder
Gets or sets the placeholder text displayed when a Paragraph block has no content.
Declaration
public string Placeholder { get; set; }
Property Value
| Type | Description |
|---|---|
| string | A string representing the placeholder text shown for an empty paragraph.
The default value is |
Remarks
Use this property to guide users on what to enter (for example, "Start typing..."). The placeholder is not
displayed once the paragraph contains content.
Any string is allowed, including an empty string. If the value is null or empty, no placeholder text is rendered.
For localization, provide region-specific text via resource files to ensure a consistent user experience across locales.