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.
Unfortunately, activation email could not send to your email. Please try again.

Richtexteditor generate error in web forms when text have format

Thread ID:

Created:

Updated:

Platform:

Replies:

123335 Mar 8,2016 04:27 PM Apr 21,2016 07:25 AM ASP.NET Web Forms 8
loading
Tags: RichTextEditor
Roimer Machacón Otero
Asked On March 8, 2016 04:27 PM

Hi, we're using the richtexteditor, now when we want send the data for save in the database, this richtexteditor generate error in the web form when the text have any format, while not have format this work correctly.

Watching the documentation appear this EnableHtmlEncode="true" but in the version 12.4.0.34 that we have this property in the definition of the RTE is invalid.

Attached image with the error that appear.

Attachment: Error_RTE_717df9ac.rar

Arun Palaniyandi [Syncfusion]
Replied On March 9, 2016 07:05 AM

Hi Roimer,

Thanks for contacting Syncfusion support.

Query:” Hi, we're using the richtexteditor, now when we want send the data for save in the database, this richtexteditor generate error in the web form when the text have any format, while not have format this work correctly. Watching the documentation appear this EnableHtmlEncode="true" but in the version 12.4.0.34 that we have this property in the definition of the RTE is invalid.”

The support for the EnableHtmlEncode property is given from the 13.3.0.7 version only. Based on the analysis of the shared details we suspect that you are using the old scripts for the DLLs that are referred. Hence we suggest you to refer the appropriate scripts for the DLLs. This EnableHtmlEncode property will work if you are using the scripts from 13.3.0.7 version. If you still using the older version, we kindly advise you to upgrade to our newer versions to get this functionality.

Please refer the below link for the feature release note:
http://files2.syncfusion.com/Installs/v13.3.0.7/ReleaseNotes/ASP.html#ASPNET-Tools

we have also prepared a sample based on this scenario and the sample can be found below:
http://www.syncfusion.com/downloads/support/forum/123335/ze/Websample-1017093850

Please let us know if you have any queries.

Regards,
Arun P

Roimer Machacón Otero
Replied On March 9, 2016 08:35 AM

Now this means that the version we have (12.4.0.34) can't read the value with format? Only can read the value without format.

Exist a form of remove the toolbar, for that users no use this functionality and can cause errors in the save data?

Roimer Machacón Otero
Replied On March 9, 2016 08:38 AM

Now in our version 12.4.0.34 exist a form of read the value with format (emulate the EnableHtmlEncode) ???

Arun Palaniyandi [Syncfusion]
Replied On March 10, 2016 07:22 AM

Hi Roimer,

Thanks for the update,

Query # 1:”Now this means that the version we have (12.4.0.34) can't read the value with format? Only can read the value without format. Now in our version 12.4.0.34 exist a form of read the value with format (emulate the EnableHtmlEncode) ???”

You can achieve this functionality in your version by using the following workaround prepared with the help of client side events.

<code>

<ej:Button ID="Button1" Type="Button" runat="server" Text="Button" ClientSideOnClick="onclickencode"></ej:Button>

<script>

    function onclickencode(args)

    {

        var rte = $("#<%=DefaultRTE.ClientID%>").ejRTE("instance");

        rte.option("value", $('<div/>').text(rte.model.value).html());

    }

</script>


</code>


Please find the sample for your reference below:

http://www.syncfusion.com/downloads/support/forum/123335/ze/Websample1715129117



Please try the solution and  let us know if you need further assistance.

Regards,
Arun P


Roimer Machacón Otero
Replied On March 10, 2016 11:47 AM

Hi, thanks for the answer, now we can save the data how html in the database, now when want show the data in the RichTextEditor? Now seeing asp.net show an error when intent put the data formatted

Arun Palaniyandi [Syncfusion]
Replied On March 11, 2016 10:02 AM

Hi Roimer,

Thanks for the update,

 
Query : “now when want show the data in the RichTextEditor? Now seeing asp.net show an error when intent put the data formatted.”
 
If you get the error as “A potentially dangerous Request.Form value was detected from the client (MainContent_DefaultRTE_formatDDL="<p>").”,we suggest you to include the below lines in your web.config file as a workaround.
 
<web.config>
 
<system.web>
<httpRuntime  requestValidationMode="2.0" />
.....................
..............
<pages validateRequest="false">
.........................
.........................
</pages>
</system.web>

This error occurs because ASP.NET 4 validates every request that is received. Older versions of ASP.NET only validated requests to ASPX pages.

We have also prepared a sample for you reference and the sample can be find below:

http://www.syncfusion.com/downloads/support/forum/123335/ze/RTEsample2008666446

If this wasn’t your error, we request you to share us the mentioned error’s detailed description. . And we also request you to share the error screenshot or your code snippets so that we would isolate the issue and help you out better.
 
Please let us know if you need further assistance.

Regards,
Arun P


Venkata
Replied On April 20, 2016 11:14 PM

Dear team,

I tried your solution for Javascript controls but it did not work. 

$("#emailContents").ejRTE({ width: "100%", minWidth: "150px", isResponsive: true, enableHtmlEncode: true});

Appreciate any help.

Thanks,
Venkata

Dhinesh Ravi [Syncfusion]
Replied On April 21, 2016 07:25 AM

Hi Venkata,

EnableHtmlEncode encrypts the html elements which is given as text in the RTE. We have created the simple sample using enableHtmlEncode property and it works fine without any issues at out end. Refer to the sample in the following link.

http://jsplayground.syncfusion.com/0qc0vmkq

In this case, could you please be more specific about the issue scenario or replace your code in the sample we have provided. And also please share us the Essential Studio Version you are using. Since this feature is available from the build version 13.3.0.7



Regards,
Dhinesh R

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.

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.

;