开发者

Cannot display Tiny MCE Editor inside update panel C#

I cannot display my tiny MCE editor inside update panel.

I have two update panel using update mode "conditional" In the first I added button on click of it display MCE editor which is inside second update panel I did this from my code behind, on click event I upd开发者_如何学编程ated both panels

UpdatePanel1.Update();
UpdatePanel2.Update();

div.Style.Add("display", "block");//this is inside second update pane

Its simple text Area rather than MCE editor itself..


You have to call the initializing method of the TinyMCE whenever the update panel is refreshed.

For this, you have either to call this method (tinyMCE.init) from a RegisterStartupScript method,

      protected void Page_Load(object sender, System.EventArgs e)
      {                
          ScriptManager.RegisterStartupScript(this.Page, 
              this.Page.GetType(), mce.ClientID, "callInt" + mce.ClientID + "();",  true);
       }

OR to create a page load javascript function in the head section of the page like this:

     function pageLoad() 
     {
         tinyMCE.init();
      }


      <body onload="pageLoad()">  
      </body> 

Hope this helps..

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜