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. (Last updated on: June 24, 2019).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

How to change default multiline textbox editor to RichTextEditor?

Thread ID:

Created:

Updated:

Platform:

Replies:

150781 Jan 18,2020 12:23 PM UTC Jan 21,2020 09:59 AM UTC ASP.NET MVC - EJ 2 1
loading
Tags: Schedule
Humanjo Daro
Asked On January 19, 2020 07:05 AM UTC

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,

Vengatesh Maniraj [Syncfusion]
Replied On 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 


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile
Live Chat Icon