@{
List<String> toolsList = new List<string>() { "importExport" };
List<String> ImportExport = new List<string>() { "wordExport", "pdfExport" };
}
@{
Html.EJ().RTE("rteSample").Width("100%").ContentTemplate(@<div>
<p>The Rich Text Editor (RTE) control is an easy to render in
client side. Customer easy to edit the contents and get the HTML content for
the displayed content. A rich text editor control provides users with a toolbar
that helps them to apply rich text formats to the text entered in the text
area. </p>
</div>).MinWidth("200px").ToolsList(toolsList).Tools(tool => tool.ImportExport(ImportExport))
.ExportToWordSettings(exportToWordSettings => exportToWordSettings.Url("ExportToWord").FileName("WordExport"))
.ExportToPdfSettings(exportToPdfSettings => exportToPdfSettings.Url("ExportToPDF").FileName("PdfExport")).Render();
}
<script>
$(function () {
//setting the contentEditable as false to prevent editing in RTE text area by using RTE instance
($($("#rteSample").ejRTE("instance").wrapper[0]).find("iframe"))[0].contentDocument.body.contentEditable = false;
});
</script> |