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

Read-only Rich Text Editor

I've now got my Rich text Editor working correctly (thanks for your help!) but some screens shouldn't show a true editor but a read-only view of the information.
In "olden" VB.Net GUI days it would be simple - just stick a .ReadOnly = True in the startup of the page ... but this new fangled HTML stuff is a bit different :)

I've Googled and searched and can see how to do it in LS Silverlight I think but can't twig how to sort this out in LS HTML Could someone point me in the right direction please?

NB. I can see how to get rid of the toolbar etc. - all I need to do is to stop anyone typing anything in to the control itself

Thanks in advance!
Steve.

3 Replies

SN Sasikala Nagarajan Syncfusion Team March 23, 2015 12:39 PM UTC

Hi Steve,

Thanks for using Syncfusion products,

We have analyzed your query (“all I need to do is to stop anyone typing anything in to the control itself”).We can achieve your requirement using our existing property of RTE allowEditing (Enables/Disables the editing of the content in rte.) .Please refer the below code snippet.

myapp.Browse.RTE_render = function (element, contentItem) {

var input = $("<textarea />");

input.attr('id','RTE');

input.attr("data-role","none");

input.appendTo($(element));

input.ejRTE({

value: contentItem.value,

change: function (args) {

contentItem.value = args.text;

}, allowEditing: false

});

};

To know more about available RTE properties, methods, events and its argument please refer the following link:

http://help.syncfusion.com/cr/js - This link showcases the list of Essential JS components and also includes API’s, Methods, and events and its arguments list supported by each corresponding components.

Please let us know if you have further queries,

Regards,

Sasikala Nagarajan



SC Steve Cliff March 23, 2015 09:18 PM UTC

Thanks again for your help - this sorted my problem out. I hadn't managed to find the API info until you linked it (I'd used http://help.syncfusion.com/lightswitch instead as my main source of detail) - very useful :)


SN Sasikala Nagarajan Syncfusion Team March 25, 2015 03:36 AM UTC

Hi Steve,

Thanks for the update.Please let us know if you have further queries,

Regards,

Sasikala Nagarajan

Loader.
Live Chat Icon For mobile
Up arrow icon