I am using TinyMCE in DetailView in EDIT MODE . I would like to ...">

Details View and integrate with TinyMCE <% @Page validateRequest = "false"%>

I am using TinyMCE in DetailView in EDIT MODE .

I would like to know if there is a solution that can prevent the request from being validated in order to cause an error.

WITHOUT USE <%@ Page validateRequest="false" %> for my page.

The only way that I have discovered so far is to encode the TextBox used by TinyMCE with the option: "xml"

tinyMCE.init({
        encoding: "xml",

Thus, checking the request does not cause an error, but at that time the result was encoded to read data in the TextBox. I also tried to decode the contents of the TextBox on the Load page using this code

myTextBox.Text = HttpUtility.HtmlDecode(myTextBox.Text)

But the result is not as expected, so I can only render it encoded text.

?

UPDATE


. _DataBound DetailsView

       TextBox myContentAuthor = (TextBox)uxAuthorListDetailsView.FindControl("uxContentAuthorInput");
        myContentAuthor.Text = HttpUtility.HtmlDecode(myContentAuthor.Text);

, DataBound ( ) .

:

01 - TinyMCE ESCAPE, : "xml" ,

02 - ESCAPED

03 - TextBox, TinyMCE, DATABOUND EVENT DetailView HttpUtility.HtmlDecode( ).

04 - . TinyMCE : "xml"

, - .

, , ! Mybe !: -)

+3
3

.

, - .., ""

0

, html- .

0

:
PostBack , TinyMCE . , , ...

In Page_Loadyou should check if there is a PostBack -> You are replacing myTextBox.TextwithHttpUtility.HtmlDecode(myTextBox.Text)

I try, it works ...

0
source

Source: https://habr.com/ru/post/1781434/


All Articles