Skip to content

Adding text dynamically to the html editor is not working #23

@NETKroks

Description

@NETKroks

This is my MudHtmlEditor component:

 <MudHtmlEditor @ref="_htmlEditor" @bind-Html="_currentTemplate.Body">
 <MudHtmlToolbarOptions InsertImage="true" />
 </MudHtmlEditor>

And I try to add text / html code dynamically to the editor by doing the following

private void InsertVariable(string variable)
{
 _currentTemplate.Body += $"<p>{{{{{variable}}}}}</p>";
 StateHasChanged();
}

(I have also tried SetHtml and calling the OnChange methods manually but none of this worked for some reason)

Metadata

Metadata

Labels

bugSomething isn't working

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions