Re: failed to load

  •  01-28-2008, 5:12 PM

    Re: failed to load

    Hi Adam,
     
    This is an intranet site.
    We have created a user control that displays CuteEditor in 2 modes.
    We use this control in many pages where we need textarea like input.
     
    By default, CuteEditor's configuration is Simple. Following is the code snippet from aspx

    <asp:MultiView ActiveViewIndex="0" runat="server" ID="textAreaMultiView">

     

    <asp:View runat="server" ID="textAreaView">

    <asp:panel id="textAreaPanel" Runat="server">

    <CE:Editor ID="textArea" runat="server" AutoConfigure="Simple" BackColor="#B6C4D2" BorderColor="#B6C4D2" ContextMenuMode="Simple" EnableObjectResizing="False" ShowDecreaseButton="False" ShowEnlargeButton="False" ShowHtmlMode="False" ShowPreviewMode="False" ThemeType="OfficeXP" Width="100%" Height="400px" ShowBottomBar="False" ShowCodeViewToolBar="False" ShowGroupMenuImage="False" ShowTagSelector="False" EditorOnPaste="PasteWord" CodeViewTemplateItemList="" EditorWysiwygModeCss="~/Styles/CuteEditor.css" EnableBrowserContextMenu="False">

    <FrameStyle BackColor="White" BorderColor="#DDDDDD" BorderStyle="Solid" BorderWidth="0px"

    CssClass="CuteEditorFrame" Height="100%" Width="100%" />

    <TextAreaStyle Font-Names="Trebuchet MS" Font-Size="10pt" />

    </CE:Editor>

    </asp:panel>

    </asp:View>

    <asp:View runat="server" ID="printPreviewView">

    <table class="table">

    <tr>

    <td><asp:Panel BackColor="white" runat="server" ID="PrintPreviewPanel" Width="100%" ></asp:Panel></td>

    </tr>

    </table>

    </asp:View>

     

    </asp:MultiView>
     
    In some pages, we don't need the toolbar. So we change the look via following public method in code behind

    public void SetPlainMode()

    {

    textArea.AutoConfigure = AutoConfigure.None;

    textArea.ContextMenuMode = string.Empty;

    textArea.EnableContextMenu = false;

    textArea.EnableBrowserContextMenu = true;

    }
     
    In the screen shot above, we are calling this method in Page_Load of that page that uses this user control.
     
    I hope this will give you enough clues.
     
    cheers
View Complete Thread