View Full Version : Using Panel and HTMLEditor

Feb 15, 2010, 8:00 AM
Hi Coolite,

Can you kindly advise on what JS method to call when I want to get the value of a Panel after editing with a HTML Editor.

The code below might offer more explanation.

<ext:Panel ID="Panel1" runat="server" Width="610" Height="300" Html="Content" BodyStyle="padding:6px;"
Title="Editor panel">
<ext:Toolbar ID="Toolbar1" runat="server">
<ext:ToolbarButton ID="Button1" runat="server" Text="Edit" Icon="Pencil">
<Click Handler="el.setDisabled(true);#{Button2}.setDisabled(false) ;#{Editor1}.startEdit(#{Panel1}.getBody());" />
<ext:ToolbarButton ID="Button2" runat="server" Text="Save" Icon="Disk" Disabled="true">
<Click Handler="el.setDisabled(true);#{Button1}.setDisabled(false) ;#{Editor1}.completeEdit();" />

<ext:Editor ID="Editor1" runat="server" AutoSize="Fit" Shadow="None">
<ext:HtmlEditor ID="HtmlEditor2" runat="server" />

<ext:Button ID="Button7" runat="server" Text="WYSIWYG">
<Click OnEvent="CompleteEdit3">
<ext:Parameter Name="HTMLPanel" Value="#{Panel1}.getBody()" Mode="Raw" />

protected void CompleteEdit3(object sender, AjaxEventArgs e)
this.AjaxLabel.Html = "qqqq " + e.ExtraParams["HTMLPanel"];

On clicking the Button7, I only get "qqqq" and without the value in Panel1. I tried #{Panel1}.getText(), but that returned undefined function.

Thanks in anticipation.