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!

  • Check out the features or bugs others have reported and vote on your favorites. Feedback will be prioritized based on popularity.
  • If you have feedback that’s not listed yet, submit your own.

Thanks for joining our community and helping improve Syncfusion products!

2
Votes

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 FontSizeItems = new()

    {

        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" },

    };

[...]


Problem:
In ~1/10 clicks this throws an:

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.