Welcome Guest Search | Active Topics | Sign In | Register

eo:Editor. Not work setJtml js method Options
Maxim
Posted: Tuesday, November 24, 2009 2:49:03 AM
Rank: Advanced Member
Groups: Member

Joined: 12/26/2008
Posts: 45
I am using IE 8.0
Code: HTML/ASPX
<body style="margin:0; padding:0;" >
    <form id="form1" runat="server" target=_self>
        <script type="text/javascript">
            function GetValue() {
                return eo_GetObject('<%=Editor1.ClientID %>').getHtml();
            }
            function SetValue(strHtml) {
                eo_GetObject('<%=Editor1.ClientID %>').setHtml(strHtml);
            }


        </script>
        <eo:Editor Height="450px" SpellCheckerID="SpellChecker1" Width="600px" 
            runat="server" ID="Editor1" 
            DesignTabButtonText="&lt;div style=&quot;padding-left:18px;padding-top:3px;&quot;&gt;Design&lt;/div&gt;" 
            Font-Bold="False" Font-Italic="False" Font-Overline="False" 
            Font-Strikeout="False" Font-Underline="False" 
            HighlightColor="255, 255, 192" 
            HtmlTabButtonText="&lt;div style=&quot;padding-left:18px;padding-top:3px;&quot;&gt;HTML&lt;/div&gt;" 
            PreviewTabButtonText="&lt;div style=&quot;padding-left:18px;padding-top:3px;&quot;&gt;Preview&lt;/div&gt;" 
            ToolBarSkin="Office2003_XPStyle" >
            <FooterStyle CssText="padding-right: 2px; padding-left: 2px; padding-bottom: 2px; padding-top: 0px; background-color:#9ebef5;" />
            <BreadcrumbItemStyle CssText="display:none;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="display:none;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:SpellChecker id="SpellChecker1" runat="server" DialogID="SpellCheckerDialog1" ClientSideOnError="spellOnError"></eo:SpellChecker>
	<eo:SpellCheckerDialog id="SpellCheckerDialog1" Width="320px" Height="216px" runat="server" ControlSkinID="None"
	CloseButtonUrl="00070301" BackColor="#ECE9D8" HeaderHtml="Spell Checker">
	<FooterStyleActive CssClass="SpellChecker_FooterStyleActive"></FooterStyleActive>
	<HeaderStyleActive CssClass="SpellChecker_HeaderStyleActive"></HeaderStyleActive>
	<ContentStyleActive  CssClass="SpellChecker_ContentStyleActive"></ContentStyleActive>
	<BorderImages BottomBorder="00020112" RightBorder="00020111" TopRightCornerBottom="00020106" TopLeftCornerRight="00020102"
		TopRightCorner="00020104" LeftBorder="00020110" TopLeftCorner="00020101" BottomRightCorner="00020108"
		TopLeftCornerBottom="00020103" BottomLeftCorner="00020107" TopRightCornerLeft="00020105" TopBorder="00020109"></BorderImages>
</eo:SpellCheckerDialog>
        
    </form>
</body>
Maxim
Posted: Tuesday, November 24, 2009 3:02:12 AM
Rank: Advanced Member
Groups: Member

Joined: 12/26/2008
Posts: 45
In ie 6.0 the same code work fine.
But in ie 6.0 not worked Tool buttons :(


in additional:

Editor and SpellChecher placed in aspx file.
I open this open from other asp page across window.open

Code: JavaScript
var width = 600;
            var height = 450;
            var left = (screen.width / 2) - (width / 2);
            var top = (screen.height / 2) - (height / 2);
            mainElement.RichEditorWindow = window.open("DischargeControls/CommonControls/DPRichText/DPRichText.aspx", "Editor" + Math.round((Math.random() * 10000)), "status=no,toolbar=no,menubar=no,location=no,resizable=no,scrollbars=no,height=" + height + ",width=" + width + ",left=" + left + ",top=" + top + "");
            while (mainElement.RichEditorWindow.document.readyState != "complete") {
                //wait when page loaded
            }
            mainElement.RichEditorWindow.SetValue(notEditElement.innerHTML);
Maxim
Posted: Tuesday, November 24, 2009 5:48:18 AM
Rank: Advanced Member
Groups: Member

Joined: 12/26/2008
Posts: 45
In ie 6.0 problem was fixed by removing line "target=_self", but in 8.0 as before not work setHtml
eo_support
Posted: Tuesday, November 24, 2009 8:25:10 AM
Rank: Administration
Groups: Administration

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

You will need to delay the call a little bit because the editor is loaded after the page is loaded. Once you see your page's readyState is complete, you can start a short timer (for example, 200ms) and then call setValue inside the timer.

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.