PDA

View Full Version : CuteEditor not loading in ExtJs Panel



ajit
16 Aug 2009, 10:57 PM
Hello All,

I am loading cuteeditor in a page in Extjs Panel in safari browser but it is giving us the error in alert panel
"editdoc is undefined TypeError", I have researched all the code of cuteeditor and extjs but not able to find the real problem.

But I have searched one alternate solution that i have loaded cuteeditor in a page that contains no extjs code and loaded that page in a iframe which is the child of an extjs panel. It works fine but it doesn't seem good because i don't want to load cuteeditor in any iframe. I want load it direct in the Panel.

see test.jpg for the screen shot in safari and
see testwin.jpg for the screen shot in IE.

Code is

<%@PageLanguage="C#"AutoEventWireup="true"CodeBehind="TestMe.aspx.cs"Inherits="PXEEditor.TestMe" %>
<%@RegisterTagPrefix="ce"Namespace="CuteEditor"Assembly="CuteEditor" %>
<!DOCTYPEhtmlPUBLIC"-//W3C//DTD XHTML 1.0 Transitional//EN""http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<htmlxmlns="http://www.w3.org/1999/xhtml">
<headid="Head1"runat="server">
<title>Untitled Page</title>
<linkrel="stylesheet"type="text/css"href="resources/css/ext-all.css"/>
<scripttype="text/javascript"src="js/ext/ext-base.js"></script>
<scripttype="text/javascript"src="js/ext/ext-all.js"></script>
<script>
Ext.onReady(function(){
var p = new Ext.Panel({
renderTo:'test',
contentEl:'edit',
title:'Editor'
});
});
</script>
</head>
<body>
<formid="form2"runat="server">
<divid="test"></div>
<divid="edit">
<ce:EditorID="Editor1"Style="z-index: 0;"TabIndex="1"CssClass="CuteEditor"ShowPreviewMode="False"
ShowHtmlMode="False"UseHTMLEntities="false"UseSimpleAmpersand="True"EnableObjectResizing="True"
UsePhysicalFormattingTags="True"EditorWysiwygModeCss=""EnableContextMenu="True"
BreakElement="P"ShowBottomBar="false"AutoConfigure="Full"EnableBrowserContextMenu="False"
EditorOnPaste="PasteText"EnableContextMenuEditing="False"EnableContextMenuFormat="False"
EnableContextMenuInsert="False"EnableContextMenuInsertAdvanced="False"EnableContextMenuInsertFiles="False"
EnableContextMenuInsertForms="False"EnableContextMenuRelative="False"EnableContextMenuTags="False"
EnableContextMenuVerbs="False"ShowEnlargeButton="False"ShowDecreaseButton="False"
EditCompleteDocument="True"ThemeType="Custom"runat="server"Height="580"
Width="100%">
</ce:Editor>
</div>
</form>
</body>
</html>

server side

protectedvoid Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
Editor1.LoadHtml("chapters/a.htm");
}
}

Please help me.

Thanks in advance.