Skip to content

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

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)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

bugSomething isn't working

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions