|
|
Posted 29/01/2004 09:40:00 |
|
|
Forum Newbie
      
Group: Customers
Last Login: 05/02/2004 12:20:00
Posts: 17,
Visits: 1
|
|
I am attempting to use the Rich Text Editor (i.e. the WYSIWYG control) on a new page within my .NET project. I have successfully added the control to my new page and it displays correctly and seems to function normally. However, I am unable to see any text that I assign to the Text property of the coltrol. For whatever reason, it does not appear in the iframe, but yet, if you view the HTML source for the page in IE, you can see that the Test attribute of the INPUT tag does in fact contain the text in question. Has anyone else tried to do this? Any idea what I'm missing? Thanks in advance.  Below are code snipits from my troubled page... == newPage.aspx == <%@ Page Language="vb" Codebehind="newPage.aspx.vb" Inherits="MiamiSC.Website.newPage"%> <% @Register tagPrefix="InstantForum" Namespace="MiamiSC.Controls" Assembly="MiamiSCForum" %> <tr> <td> <form id="frmNewPage" name="frmNewPage" runat="server"> <asp: Panel ID="pnlEditor" Runat="server"> <InstantForum:RichTextEdit id="rteEditor" DialogPath="forum/wysiwyg/dialogs" IconImagePath="forum/wysiwyg/images" TabIndexOverRides="2" ToolbarColor="#F0EEE1" BorderColor="#BBC8E5" ToolbarItemOver="#F4F8FB" ToolbarItemOverBorder="#316AC5" FormName="frmNewPage" runat="server" /> </asp: Panel> </form> </td> </tr> == newPage.aspx.vb == Imports System.Data.SqlClient Public Class newPage Inherits templatePage Protected WithEvents rteEditor As MiamiSC.Controls.RichTextEdit Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) rteEditor.EnableEmotIcons = False rteEditor.Text = "<p>what is going on?</p>" End Sub End Class<%@ Page Language="vb" Codebehind="calendar.aspx.vb" Inherits="MiamiSC.Website.calendar"%><% @Register tagPrefix="InstantForum" Namespace="MiamiSC.Controls" Assembly="MiamiSCForum" %><%@ Page Language="vb" Codebehind="calendar.aspx.vb" Inherits="MiamiSC.Website.calendar"%><%@ Page Language="vb" Codebehind="calendar.aspx.vb" Inherits="MiamiSC.Website.calendar"%><% @Register tagPrefix="InstantForum" Namespace="MiamiSC.Controls" Assembly="MiamiSCForum" %><% @Register tagPrefix="InstantForum" Namespace="MiamiSC.Controls" Assembly="MiamiSCForum" %>
-=AcR=-
"No matter how hard you try to teach your cat general relativity, you’re going to fail." - Brian Greene http://www.pbs.org/wgbh/nova/elegant/
|
|
|
|
Posted 29/01/2004 09:45:00 |
|
|
IF.NET 4.2 Coming Soon
      
Group: Administrators
Last Login: 13/11/2008 13:12:14
Posts: 1,955,
Visits: 3,014
|
|
Hi - Could you try remove the panel containing the control? Not sure if this is the cause as the RTB should work in all container controls however i would check this first. Other than this everything looks good but i'll have a think - hope this helps a little.
 Kindest Regards,
Ryan Healey Director / Developer
Explore our products... http://demos.instantasp.co.uk/
|
|
|
|
Posted 29/01/2004 10:32:00 |
|
|
Forum Newbie
      
Group: Customers
Last Login: 05/02/2004 12:20:00
Posts: 17,
Visits: 1
|
|
Removing the panel control didn't help. 
-=AcR=-
"No matter how hard you try to teach your cat general relativity, you’re going to fail." - Brian Greene http://www.pbs.org/wgbh/nova/elegant/
|
|
|
|
Posted 29/01/2004 10:35:00 |
|
|
Forum Newbie
      
Group: Customers
Last Login: 05/02/2004 12:20:00
Posts: 17,
Visits: 1
|
|
Hmmm... I just noticed something else. After the page loads, when you click in the iframe, the "Font" dropdown goes blank. You can still use the dropdown, and it does change the font, but it never displays the font currently selected. Interesting 
-=AcR=-
"No matter how hard you try to teach your cat general relativity, you’re going to fail." - Brian Greene http://www.pbs.org/wgbh/nova/elegant/
|
|
|
|
Posted 29/01/2004 11:29:00 |
|
|
IF.NET 4.2 Coming Soon
      
Group: Administrators
Last Login: 13/11/2008 13:12:14
Posts: 1,955,
Visits: 3,014
|
|
|
|
|
Posted 29/01/2004 12:21:00 |
|
|
Forum Newbie
      
Group: Customers
Last Login: 05/02/2004 12:20:00
Posts: 17,
Visits: 1
|
|
Unfortunately this project is inside our intranet. There is currently no outside Internet access to it. 
-=AcR=-
"No matter how hard you try to teach your cat general relativity, you’re going to fail." - Brian Greene http://www.pbs.org/wgbh/nova/elegant/
|
|
|
|
Posted 29/01/2004 12:44:00 |
|
|
IF.NET 4.2 Coming Soon
      
Group: Administrators
Last Login: 13/11/2008 13:12:14
Posts: 1,955,
Visits: 3,014
|
|
Hi Antony - Could you try the following... rteEditor.TextHTML = "<p>what is going on?</p>"
Please let me know if this works 
 Kindest Regards,
Ryan Healey Director / Developer
Explore our products... http://demos.instantasp.co.uk/
|
|
|
|
Posted 29/01/2004 13:25:00 |
|
|
Forum Newbie
      
Group: Customers
Last Login: 05/02/2004 12:20:00
Posts: 17,
Visits: 1
|
|
OK... I've gotten a bit further toward a resolution to my problem, but still having some issues. I've discovered that with the RTE in newPage.aspx, the HTML source is showing the same ID for the following objects... Font, Font Size, Font Style, and the INPUT tag that holds the iframe text. Here are the four objects in question... ==Font== <select style="font-family: sans-serif, arial, tahoma, verdana; cursor:hand; font-color: #333333; font-size: 11px;" onchange="rteEditor_cmdExec('fontname',this[this.selectedIndex].value); this.selectedIndex=0; this.focus()" id="rteEditor"><option selected>Font</option><option value="Arial">Arial</option><option value="Arial Black">Arial Black</option><option value="Arial Narrow">Arial Narrow</option><option value="Comic Sans MS">Comic Sans MS</option><option value="Courier New">Courier New</option><option value="System">System</option><option value="Tahoma">Tahoma</option><option value="Times New Roman">Times New Roman</option><option value="Verdana">Verdana</option><option value="Wingdings">Wingdings</option></select> ==Font Size== <select style="font-family: sans-serif, arial, tahoma, verdana; cursor:hand; font-color: #333333; font-size: 11px;" onChange="rteEditor_cmdExec('fontsize',this[this.selectedIndex].value); this.selectedIndex=0; this.focus()" id="rteEditor"><option selected>Size</option><option value="1">1</option><option value="2">2</option><option value="3">3</option><option value="4">4</option><option value="5">5</option><option value="6">6</option><option value="7">7</option></select> ==Font Style== <select style="font-family: sans-serif, arial, tahoma, verdana; cursor:hand; font-color: #333333; font-size: 11px;" onChange="rteEditor_cmdExec('formatBlock',this[this.selectedIndex].value); this.selectedIndex=0; this.focus()" id="rteEditor"><option selected>Style</option><option value="Normal">Normal</option><option value="Heading 1">Heading 1</option><option value="Heading 2">Heading 2</option><option value="Heading 3">Heading 3</option><option value="Heading 4">Heading 4</option><option value="Heading 5">Heading 5</option><option value="Address">Address</option><option value="Formatted">Formatted</option><option value="Definition Term">Definition Term</option></select> ==RTE Input Tag== <input name="rteEditor" type="text" value="<p>what is going on?</p>" id="rteEditor" style="display:none;" />
Apparantly this is what was causing my problem on newPage.aspx. I modified the three following functions in MnuItems.vb so that they would generate unique IDs for the three font dropdowns... and viola my newPage.aspx works. InsertFontDropDownList(), InsertFontSizeDropDownList(), and InsertFontStyleDropDownList
BUT... now the RTE does not work in the forums!  So.... I am obvioulsy missing something in regard to how these objects are getting IDed and utilized by the various InstantForum code. I'm still trudging along toward a solution, but any insight from other will be greatly appreciated. Once again, thanks in advance. 
-=AcR=-
"No matter how hard you try to teach your cat general relativity, you’re going to fail." - Brian Greene http://www.pbs.org/wgbh/nova/elegant/
|
|
|
|
Posted 29/01/2004 13:43:00 |
|
|
IF.NET 4.2 Coming Soon
      
Group: Administrators
Last Login: 13/11/2008 13:12:14
Posts: 1,955,
Visits: 3,014
|
|
Hi - You can safely remove the id="rteEditor" code within the MnuItems.vb for all three drop down lists and this will still work perfect for the forums and should not cause any problems for your pages. I've removed this from my local version and testing seems good. Regarding the text property not populating the RTE in your example i'm looking at this. This is the exact code taken from post.ascx that populates the control when a user is editing a post for a pointer... If Not dr("Message") Is Nothing And Not dr("Message") Is System.DBNull.Value Then rteEditor.Text = CType(dr("Message"), String) End IfBecause you are using the exact same method i suspect the problem lies within your code or how you have implemented the control. I'll look at this again 
 Kindest Regards,
Ryan Healey Director / Developer
Explore our products... http://demos.instantasp.co.uk/
|
|
| |