Welcome Guest Search | Active Topics | Sign In | Register

Editor HTML property does not refresh Options
markus
Posted: Friday, May 4, 2012 3:55:40 AM
Rank: Newbie
Groups: Member

Joined: 5/4/2012
Posts: 1
Hello,

I am using the Editor control to allow users to enter HTML content to my page. The Editor is located within a Dialog control and the entered content should be stored on Dialog commands (save and cancel command).

If the editor is opened with empty content, everything works fine - after closing the dialog I can get the content from the HTML property. If old content is placed in the HTML property on startup, the content is changed in the editor and then the dialog's save button is pressed, then no change is visible in the HTML property - it still contains the old value.

Here is my source code:

Quote:

<asp:ImageButton runat="server" ID="btnEdit" OnCommand="dlgEditItem_Command" CommandName="edit" ImageUrl="../../images/action/edit16.gif" ToolTip='edit' />
<eo:Dialog ID="dlgEditItem" runat="server" BackColor="White" Height="300px" Width="400px"
AcceptButton="btnAccept" CancelButton="btnCancelEdit"
AcceptButtonPostBack="true" CancelButtonPostBack="true">
<contenttemplate>
<eo:Editor runat="server" id="editor" visible="false">
</eo:Editor>
</contenttemplate>
<footertemplate>
<asp:Button ID="btnAccept" runat="server" CommandName="save" OnCommand="dlgEditItem_Command"
Text='save' UseSubmitBehavior="true" />
<asp:Button ID="btnCancelEdit" runat="server" CommandName="cancel" OnCommand="dlgEditItem_Command"
Text='cancel' UseSubmitBehavior="true" />
</footertemplate>
</eo:Dialog>


Quote:

private string content;
protected void dlgEditItem_Command(object sender, CommandEventArgs e)
{
switch (e.CommandName)
{
case "edit":
editor.Visible = true;
editor.Html = content;
dlgEditItem.Show();
break;
case "save":
content = editor.Html;
editor.Visible = false;
break;
case "cancel":
editor.Html = content;
editor.Visible = false;
break;
}
}


eo_support
Posted: Friday, May 4, 2012 8:56:59 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,195
Hi,

I would think that's because your code has reloaded the old contents into the Editor at some point thus wiping out whatever the editor has. If you do not believe that's the case, please create a small test page to demonstrate the problem and we will investigate further.

Thanks!


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.