Welcome to the Blazor feedback portal. We’re happy you’re here! If you have feedback on how to improve the Blazor, we’d love to hear it!>
Thanks for joining our community and helping improve Syncfusion products!
HTML:
[...]
<SfRichTextEditor EditorMode="EditorMode.HTML" @bind-Value="MyModel">
<RichTextEditorToolbarSettings Items="@StateContainer.EditorTools" />
<RichTextEditorFontSize Default="10pt" Items="@StateContainer.FontSizeItems" /><RichTextEditorPasteCleanupSettings AllowedStyleProperties="@StateContainer.AllowedStyleProperties" DeniedTags="@StateContainer.DeniedTags" Prompt />
</SfRichTextEditor>
[...]
StateContainer is an injected object that stores some static values as well as some shared properties which are used in different containers.
Code:
[...]
public static readonly List
{
new DropDownItemModel() { Text = "8 pt", Value = "8pt" },
new DropDownItemModel() { Text = "10 pt", Value = "10pt" },
new DropDownItemModel() { Text = "11 pt", Value = "11pt" },
new DropDownItemModel() { Text = "12 pt", Value = "12pt" },
new DropDownItemModel() { Text = "14 pt", Value = "14pt" },
};
System.NullReferenceException: Object reference not set to an instance of an object.
at Syncfusion.Blazor.RichTextEditor.RichTextEditorFontSize.PropertyChangeHandler(KeyCollection keys)
at Syncfusion.Blazor.RichTextEditor.DropDownButtonItemBase.OnParametersSetAsync()
at Microsoft.AspNetCore.Components.ComponentBase.CallStateHasChangedOnAsyncCompletion(Task task)
The problem started with our last deployment, where we added the
RichTextEditorToolbarSettings and RichTextEditorFontSize. Before we used everything in default without any problems.