How to make TinyMCE work inside an UpdatePanel?

前端 未结 12 921
别跟我提以往
别跟我提以往 2021-02-07 13:28

I\'m trying to do something that many people seem to have been able to do but which I am unable to implement any solution. The TinyMCE control works pretty well in an asp.net fo

12条回答
  •  礼貌的吻别
    2021-02-07 13:53

    Updating the answer to this question for those using .NET framework 4, I was successful in attaching TinyMCE to a TextBox inside an update panel by inserting the following:

    In markup within the region:

    
    
    

    In the markup within the region:

    
    

    And finally in codebehind in the Page_Load event:

    ScriptManager.RegisterStartupScript(this, this.GetType(), tbContentHtml.UniqueID + "Add", "tinyMCE.execCommand('mceAddEditor', true,'" + tbContentHtml.ClientID + "');", true);
    ScriptManager.RegisterOnSubmitStatement(this, this.GetType(), tbContentHtml.UniqueID + "Remove", "tinyMCE.execCommand('mceRemoveEditor', true,'" + tbContentHtml.ClientID + "');");
    

提交回复
热议问题