Hello again.
This is an ASP.NET question. Let's say I put an FCKeditor directly onto a .aspx page, set its ID="EditorName", and then test the following function in javascript:
This will work fine. GetXHTML returns a string of the text in the editor. If I embed the FCKeditor in a .aspx page that has a master page, however, I get the following error when the above line is called:
The reason is, when I view the generated source from the server, ASP.NET has generated a different name than "EditorName" for my editor. Instead it is "ctl00_<ContentPlaceHolderID>_EditorName", where <ContentPlaceHolderID> is the ContentPlaceHolderID property of the <asp:Content></asp:Content> control that this FCKeditor is stored in. Is this a bug in FCKeditor or is there a way I can make sure ASP.NET always generates the correct ID for the FCKEditor?
-Brandon
This is an ASP.NET question. Let's say I put an FCKeditor directly onto a .aspx page, set its ID="EditorName", and then test the following function in javascript:
var Content = FCKeditorAPI.GetInstance("EditorName").GetXHTML(true);
This will work fine. GetXHTML returns a string of the text in the editor. If I embed the FCKeditor in a .aspx page that has a master page, however, I get the following error when the above line is called:
FCKeditorAPI.GetInstance("EditorName") has no properties.
The reason is, when I view the generated source from the server, ASP.NET has generated a different name than "EditorName" for my editor. Instead it is "ctl00_<ContentPlaceHolderID>_EditorName", where <ContentPlaceHolderID> is the ContentPlaceHolderID property of the <asp:Content></asp:Content> control that this FCKeditor is stored in. Is this a bug in FCKeditor or is there a way I can make sure ASP.NET always generates the correct ID for the FCKEditor?
-Brandon
Re: FCKeditorAPI.GetInstance(string) Fails in a Master Page
Hope it helps
Re: FCKeditorAPI.GetInstance(string) Fails in a Master Page
Hi,
May you explain to me what is FCKeditor2 in the code you mentioned and how to use this code.I have a FCKEditor was working in my website but when I add it to another developer site it doesn't get Focus except if you use TAB key.Please respond to me as fast as possible because I must show the what I made for the manager soon.