You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs-aspnet/html-helpers/template/overview.md
+35-12Lines changed: 35 additions & 12 deletions
Original file line number
Diff line number
Diff line change
@@ -26,7 +26,9 @@ The Template allows you to incorporate multiple helper components into the templ
26
26
The Template HtmlHelper provides the following configuration options:
27
27
28
28
*`AddComponent()` specifies the declaration of the Telerik UI helper that will be integrated into the specified component.
29
-
*`AddHtml()` adds `HTML` code to the template. It accepts a single `string` parameter.
29
+
*`AddHtml()` adds `HTML` code to the template. It accepts a `string` and `delegate` parameter arguments.
30
+
31
+
> The delegate overload can only be used with conventional HTML tags and {% if site.core %} the ASP.NET Core framework's common [HtmlHelpers](https://learn.microsoft.com/en-us/dotnet/api/microsoft.aspnetcore.mvc.rendering.htmlhelperinputextensions?view=aspnetcore-8.0) or [TagHelpers](https://learn.microsoft.com/en-us/aspnet/core/mvc/views/tag-helpers/built-in/?view=aspnetcore-8.0) {% else %} the ASP.NET MVC framework's common [HtmlHelpers](https://learn.microsoft.com/en-us/dotnet/api/system.web.webpages.html.htmlhelper.anonymousobjecttohtmlattributes?view=aspnet-webpages-3.2) {% endif %}. To declare Telerik components, use the `AddComponent()` configuration.
30
32
31
33
{% if site.core %}
32
34
When using the TagHelper mode of the Template component, you can insert the component declaration and any `HTML` code within the `<{parentTagName}-{templateOption}>` tag.
@@ -52,7 +54,7 @@ Since the Template is an integration component and cannot be used independently,
52
54
.AddHtml("</div")
53
55
);
54
56
})
55
-
//Other configuration
57
+
//Other configuration
56
58
)
57
59
```
58
60
{% if site.core %}
@@ -118,7 +120,7 @@ The examples below show how to use the Template component to create custom edito
0 commit comments