We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

How to change default multiline textbox editor to RichTextEditor?

Hi!

How to change default editor description field textbox to rich texteditor? fedloan

<ejs-schedule id="schedule"
selectedDate="@DateTime.Now.Date"
allowDragAndDrop="true"
firstDayOfWeek="1"
locale="hu">
<e-schedule-eventsettings>
<e-data-manager url="@Url.Action("GetSchedule")"
crudUrl="@Url.Action("UpdateSchedule")"
adaptor="UrlAdaptor">e-data-manager>
<e-eventsettings-fields id="id">
<e-field-subject name="subject" />
<e-field-starttime name="startTime" />
<e-field-endtime name="endTime" />
<e-field-starttimezone name="startTimeZone" />
<e-field-endtimezone name="endTimeZone" />
<e-field-location name="location" />
<e-field-description name="description" type="e-richtexteditor"/>
<e-field-isallday name="isAllDay" />
<e-field-recurrenceid name="recurrenceId" />
<e-field-recurrencerule name="recurrenceRule" />
<e-field-recurrenceexception name="recurrenceException" />
e-eventsettings-fields>
e-schedule-eventsettings>
ejs-schedule>

Can only a custom template solve this?
If so, where can I find the default template? easybib

Thanks,

1 Reply

VM Vengatesh Maniraj Syncfusion Team January 21, 2020 09:59 AM UTC

Hi Humanjo Daro,  

Greetings from Syncfusion Support.  

We can achieve this by making use of editorTemplate field and we have prepared the sample based on the requirement which is available in below link,  


In the above sample, we have used popupOpen event to render the RichTextEditor control like below,  

function onPopupOpen(args) {  
        if (args.type === 'Editor') {  
            var startElement = args.element.querySelector('#StartTime');  
            if (!startElement.classList.contains('e-datetimepicker')) {  
                new ej.calendars.DateTimePicker({ value: new Date(startElement.value) || new Date() }, startElement);  
            }  
            var endElement = args.element.querySelector('#EndTime');  
            if (!endElement.classList.contains('e-datetimepicker')) {  
                new ej.calendars.DateTimePicker({ value: new Date(endElement.value) || new Date() }, endElement);  
            }  
  
            var reasonElement = args.element.querySelector('#Description');  
            var rteValue = args.target.classList.contains("e-work-cells") ? args.data.Description : args.data.Description;  
            if (!reasonElement.classList.contains('e-richtexteditor')) {  
                var richtextEditorObject = new ej.richtexteditor.RichTextEditor({  
                    value: rteValue  
                });  
                richtextEditorObject.appendTo(reasonElement);  
                reasonElement.setAttribute('name', 'Description');  
            }  
        }  
    }  

Kindly try the above sample and revert us for further assistance.  

Regards,  
Vengatesh 


Loader.
Live Chat Icon For mobile
Up arrow icon