|
Rank: Advanced Member Groups: Member
Joined: 6/5/2007 Posts: 35
|
I have a problem with the editor when initially the editor is not visible on the page. Specifically, I want my visitors to choose between either uploading a file or manually enter in text via the editor. When they select either option, the page displays the appropriate control - either a file upload control or the editor. However, if they elect to manualy enter text via the editor, the server side doesn't see any data - Editor.Html is null. I have verified via OnClientClick javascript that the text manually entered is present on the page.
The page layout has the editor contained inside an ASP panel, which is contained inside the EO callback panel. A checkbox is used to make the panel - and hence the editor - visible via a callback. The submit button is NOT identified as a trigger to the callback panel - I'm still using the ASP.NET FileUpload and want the file to be uploaded when the page is submitted, so no callback is involved when submitting the page.
I could work around this by using the OnClientClick javascript to save the entered text into a hidden variable, but then I have the issue of how to handle the visitor clicking the 'Save' button on the editor (BTW it would be helpful to be able to customise the toolbar items for the full editor by specifying toolbar items to remove, rather than having to specify all but one to add to a custom layout).
|
|
Rank: Advanced Member Groups: Member
Joined: 6/5/2007 Posts: 35
|
At least one issue solved - the 'Save' button is not available when the standard toolbar set is selected. And the hidden variable does the trick quite well.
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,194
|
Hi,
Would you be able to create a repro page? We are not aware of any issues like this. All our samples uses Editor inside a CallbackPanel and they work fine.
Thanks!
|
|
Rank: Advanced Member Groups: Member
Joined: 6/5/2007 Posts: 35
|
Here's the code behind:
Code: C#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
namespace AllHealthcareJobs.aspx
{
public partial class TestEditor : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
Editor1.Visible = false;
}
}
protected void Editor1_Save(object sender, EventArgs e)
{
string text = this.Editor1.Html;
}
protected void CheckBox1_CheckedChanged(object sender, EventArgs e)
{
Editor1.Visible = CheckBox1.Checked;
}
}
}
and here's the web page source:
Code: HTML/ASPX
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="TestEditor.aspx.cs" Inherits="AllHealthcareJobs.aspx.TestEditor" %>
<%@ Register Assembly="EO.Web" Namespace="EO.Web" TagPrefix="eo" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title></title>
</head>
<body>
<form id="form1" runat="server">
<div>
<eo:CallbackPanel ID="CallbackPanel1" runat="server" Height="150px"
Width="200px"
Triggers="{ControlID:CheckBox1;Parameter:},{ControlID:Editor1;Parameter:}">
<asp:CheckBox ID="CheckBox1" runat="server" Text="Show Editor"
oncheckedchanged="CheckBox1_CheckedChanged" />
<eo:Editor ID="Editor1" runat="server"
DesignTabButtonText="<div style="padding-left:18px;padding-top:3px;">Design</div>"
Font-Bold="False" Font-Italic="False" Font-Overline="False"
Font-Strikeout="False" Font-Underline="False" Height="320px"
HighlightColor="255, 255, 192"
HtmlTabButtonText="<div style="padding-left:18px;padding-top:3px;">HTML</div>"
onsave="Editor1_Save"
PreviewTabButtonText="<div style="padding-left:18px;padding-top:3px;">Preview</div>"
ToolBarSet="Full" ToolBarSkin="Office2003_XPStyle" Width="500px">
<FooterStyle
CssText="padding-right: 2px; padding-left: 2px; padding-bottom: 2px; padding-top: 0px; background-color:#9ebef5;" />
<BreadcrumbItemStyle
CssText="background-color:#d7e4fa;border-bottom-color:#002d96;border-bottom-style:solid;border-bottom-width:1px;border-left-color:#002d96;border-left-style:solid;border-left-width:1px;border-right-color:#002d96;border-right-style:solid;border-right-width:1px;border-top-color:#002d96;border-top-style:solid;border-top-width:1px;font-family:tahoma;font-size:12px;margin-top:1px;padding-bottom:1px;padding-left:3px;padding-right:3px;padding-top:1px;" />
<EmoticonStyle
CssText="background-color:white;border-bottom-color:#c5d3ed;border-bottom-style:solid;border-bottom-width:1px;border-left-color:#c5d3ed;border-left-style:solid;border-left-width:1px;border-right-color:#c5d3ed;border-right-style:solid;border-right-width:1px;border-top-color:#c5d3ed;border-top-style:solid;border-top-width:1px;padding-bottom:2px;padding-left:2px;padding-right:2px;padding-top:2px;" />
<BreadcrumbItemHoverStyle
CssText="background-color:#ffd69c;border-bottom-color:#002d96;border-bottom-style:solid;border-bottom-width:1px;border-left-color:#002d96;border-left-style:solid;border-left-width:1px;border-right-color:#002d96;border-right-style:solid;border-right-width:1px;border-top-color:#002d96;border-top-style:solid;border-top-width:1px;font-family:tahoma;font-size:12px;margin-top:1px;padding-bottom:1px;padding-left:3px;padding-right:3px;padding-top:1px;" />
<HeaderStyle
CssText="background-color:#9ebef5;padding-bottom:1px;padding-left:2px;padding-right:2px;padding-top:2px;" />
<BreadcrumbItemSeparatorStyle
CssText="width: 3px; height: 10px" />
<DesignTabButtonStyles>
<NormalStyle
CssText="font-size: 12px; background-image: url(00102001); width: 63px; font-family: tahoma; height: 21px" />
<HoverStyle
CssText="font-size: 12px; background-image: url(00102002); width: 63px; font-family: tahoma; height: 21px" />
<SelectedStyle
CssText="font-size: 12px; background-image: url(00102003); width: 63px; font-family: tahoma; height: 21px" />
</DesignTabButtonStyles>
<EmoticonDropDownStyle
CssText="border-right: #435f96 1px solid; border-top: #435f96 1px solid; border-left: #435f96 1px solid; border-bottom: #435f96 1px solid; background-color: #eef3fa" />
<BreadcrumbLabelStyle
CssText="padding-right: 6px; padding-left: 6px; font-size: 12px; padding-top: 1px; font-family: tahoma" />
<PreviewTabButtonStyles>
<NormalStyle
CssText="font-size: 12px; background-image: url(00102007); width: 63px; font-family: tahoma; height: 21px" />
<HoverStyle
CssText="font-size: 12px; background-image: url(00102008); width: 63px; font-family: tahoma; height: 21px" />
<SelectedStyle
CssText="font-size: 12px; background-image: url(00102009); width: 63px; font-family: tahoma; height: 21px" />
</PreviewTabButtonStyles>
<BreadcrumbDropDownStyle
CssText="border-right: #435f96 1px solid; border-top: #435f96 1px solid; border-left: #435f96 1px solid; border-bottom: #435f96 1px solid; background-color: #eef3fa" />
<HtmlTabButtonStyles>
<NormalStyle
CssText="font-size: 12px; background-image: url(00102004); width: 63px; font-family: tahoma; height: 21px" />
<HoverStyle
CssText="font-size: 12px; background-image: url(00102005); width: 63px; font-family: tahoma; height: 21px" />
<SelectedStyle
CssText="font-size: 12px; background-image: url(00102006); width: 63px; font-family: tahoma; height: 21px" />
</HtmlTabButtonStyles>
<EditAreaStyle
CssText="border-bottom-color:gray;border-bottom-style:solid;border-bottom-width:1px;border-left-color:gray;border-left-style:solid;border-left-width:1px;border-right-color:gray;border-right-style:solid;border-right-width:1px;border-top-color:gray;border-top-style:solid;border-top-width:1px;" />
<CustomFooterTemplate>
<div style="FLOAT: left; WIDTH: 200px;">
<asp:PlaceHolder ID="ViewTabs" runat="server"></asp:PlaceHolder>
</div>
<div style="padding-top:1px">
<asp:PlaceHolder ID="Breadcrumb" runat="server"></asp:PlaceHolder>
</div>
</CustomFooterTemplate>
</eo:Editor>
</eo:CallbackPanel>
</div>
</form>
</body>
</html>
Makes no difference whether the editor is set up as a trigger for the callback or not. The value Editor1.Html is always null.
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,194
|
Hi,
Try to place an eo:ScriptManager outside of the CallbackPanel. That should resolve the issue for you.
Thanks!
|
|