title | description | type | page_title | slug | position | tags | ticketid | res_type |
---|---|---|---|---|---|---|---|---|
Add More Formatting Options to the Mail Templates |
How to add more formatting options to the mail templates |
how-to |
Add More Formatting Options like FontName to the Mail Templates Toolbars |
add-more-formatting-options-to-mail-templates |
1539934 |
kb |
Product | Progress® Telerik® Report Server |
The Report Server has limited formatting options in its Mail Templates. This article elaborates on how you may add more of them.
The Mail Templates are Kendo Editors. They are set up in the CSHTML templates that get deployed with the Report Server.
The CSHTML templates can be found in the installation folder of the Report Server product, for example, C:\Program Files (x86)\Progress\Telerik Report Server\Telerik.ReportServer.Web\Views\Shared
.
The files are _LocalUsersMailTemplate.cshtml
and _ExternalUsersMailTemplate.cshtml
. The setup of the Kendo Editors in these files includes a limited number of options
that can be increased to enlarge the available formatting functionality when needed. For example, if you would like to be able to select 'FontName', you need to add
the fontName
option as it is absent by default. Here is the relevant part of the CSHTML script for the _ExternalUsersMailTemplate.cshtml
file:
<script id="externalUsersMailTemplateEditorTemplate" type="text/x-kendo-template">
<textarea id='externalUsersMailTemplateBodyInput'
data-role='editor'
data-messages='{ insertHtml: "variables" }'
data-tools="[
'bold',
'italic',
'underline',
'justifyLeft',
'justifyCenter',
'justifyRight',
'viewHtml',
'fontSize',
'fontName',
{
name : 'insertHtml',
items : [
#params# ]
},
]"
data-bind='value: ExternalUsersMailTemplate.Body'></textarea>
</script>