Class BlockEditorCodeBlock
Gets or sets the settings for the Code block in the editor.
Inherited Members
Namespace: Syncfusion.Blazor.BlockEditor
Assembly: Syncfusion.Blazor.dll
Syntax
public class BlockEditorCodeBlock : SfOwningComponentBase, IComponent, IHandleEvent, IHandleAfterRender, IDisposable
Remarks
This allows configuration of global code block options such as Languages and DefaultLanguage.
Constructors
BlockEditorCodeBlock()
Declaration
public BlockEditorCodeBlock()
Properties
DefaultLanguage
Gets or sets the default language used for syntax highlighting in Code blocks.
Declaration
[Parameter]
public string DefaultLanguage { get; set; }
Property Value
| Type |
|---|
| string |
Remarks
The value should correspond to one of the Languages options (for example, its identifier). Defaults to "plaintext" when not specified.
Languages
Gets or sets the collection of languages available for syntax highlighting in Code blocks.
Declaration
[Parameter]
public List<CodeLanguageModel> Languages { get; set; }
Property Value
| Type |
|---|
| List<CodeLanguageModel> |
Remarks
- Provide a list of CodeLanguageModel items to control which languages users can choose.
Methods
Dispose(bool)
Declaration
protected override void Dispose(bool disposing)
Parameters
| Type | Name | Description |
|---|---|---|
| bool | disposing |
Overrides
OnInitializedAsync()
Declaration
protected override Task OnInitializedAsync()
Returns
| Type |
|---|
| Task |