To Develop a page with the following type of requirement I had used the server side methods for this of asp.net and use updatepanel from ajaxtoolkit to avoid postback to the page. The aspx file code:- <asp:UpdatePanel ID="UpdatePanel1" runat="server"> <ContentTemplate> <table> <tr> <td style="width: 100px; height: 104px"> <asp:ListBox ID="lstReturnFields" runat="server" DataTextField="name" DataValueField="start" Rows="6" SelectionMode="Multiple" Width="150px"> </asp:ListBox> </td> <td align="center" style="height: 104px" valign="middle"> <asp:I
The Following Function will help to get plain text from the FCKEditor in almost any browser. // below is the protyping for trim string. function trimString (str) { str = this != window? this : str; return str.replace(/^\s+/g, '').replace(/\s+$/g, ''); } String.prototype.trim = trimString; //following function will return plain text function GetPlainText(FCKEditorID) { var FEditor = FCKeditorAPI.GetInstance(FCKEditorID); var Result = ""; if (FEditor.EditorDocument.body.textContent || FEditor.EditorDocument.body.textContent=="" ) { //Firefox compitable browser Result = FEditor.EditorDocument.body.textContent.trim(); } else { //IE compitable browser Result = FEditor.EditorDocument.body.innerText.trim(); } return Result; }
Comments