Organize templates into logical groups using the template array structure. Each template has a name and HTML content.
@{
var htmlTemplatesJson = JsonSerializer.Serialize(new[]
{
new { name = "Email - Welcome", html = "<h2>Welcome...</h2>..." },
new { name = "Report - Monthly", html = "<h1>Monthly Report...</h1>..." },
new { name = "Blog - Post", html = "<h1>[Blog Post Title]</h1>..." }
});
}
<richtextbox
name="templateCategoriesEditor"
toolbar="full"
height="400px"
html-templates-json="@htmlTemplatesJson" />