BoldSign®Effortlessly integrate e-signatures into your app with the BoldSign® API. Create a sandbox account!
@{ ViewBag.Title = "Index"; Layout = "~/Views/Shared/_Layout.cshtml"; } @using Syncfusion.EJ2.Navigations; @using Syncfusion.EJ2; @using Syncfusion.EJ2.Popups; @using Syncfusion.EJ2.DropDowns; <div class="control-section"> <div class="control-wrapper"> <div class="control-section"> @Html.EJS().RichTextEditor("default").Value((string)ViewBag.value).ActionComplete("actionComplete").Render() </div> </div> </div> <script> function actionComplete(args) { if (args.requestType == "Image") { imgelement = args.elements[0]; toBase64(imgelement.src, function (dataUrl) { imgelement.setAttribute('src', dataUrl) }) } } function toBase64(url, callback) { var httpRequest = new XMLHttpRequest(); httpRequest.onload = function () { var fileReader = new FileReader(); fileReader.onloadend = function () { callback(fileReader.result); } fileReader.readAsDataURL(httpRequest.response); }; httpRequest.open('GET', url); httpRequest.responseType = 'blob'; httpRequest.send(); } </script> <style> .e-richtexteditor .e-rte-srctextarea { max-width: none; } </style>
@Html.EJS().RichTextEditor("RTE").InsertImageSettings(obj => obj.SaveFormat(Syncfusion.EJ2.RichTextEditor.SaveFormat.Base64)).Render()
|