Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
235
InsertAtCaret doesn't work in Fire Fox
posted

In Firefox, if I use insertAtCaret() and put in an img tag it doesn't work. The image doesn't display when in the design mode of the Editor. If I use the setText function it does. The insertAtCaret works in IE.

I see someone else posted about this issue in 2008 http://blogs.infragistics.com/forums/p/17228/62379.aspx, is this something that can be fixed or is there another work around to insert my image at the location of the caret?

Thank you

 


Parents
  • 8160
    posted

    Hello dabenett,

    I have tested this with FF 12.0, IE 9, Chrome 19 and Net Advantage 12.1.20121.1005, the issue doesn't exist and everything works as expected. Please give me more details about your environment.

    Here is the code I used for tests:

    <%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %>
    
    <%@ Register Assembly="Infragistics4.WebUI.WebHtmlEditor.v12.1, Version=12.1.20121.1005, Culture=neutral, PublicKeyToken=7dd5c3163f2cd0cb"
        Namespace="Infragistics.WebUI.WebHtmlEditor" TagPrefix="ighedit" %>
    <!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>
        <script language="javascript" type="text/javascript">
            function Button2_onclick() {
                var editor = iged_getById("WebHtmlEditor1");
                editor.insertAtCaret("My Custom Action");
            }
        </script>
    </head>
    <body>
        <form id="form1" runat="server">
        <ighedit:WebHtmlEditor ID="WebHtmlEditor1" runat="server">
            <ClientSideEvents BeforeAction="WebHtmlEditor1_BeforeAction" />
            <DownlevelLabel ClientIDMode="Predictable"></DownlevelLabel>
            <DownlevelTextArea ClientIDMode="Predictable"></DownlevelTextArea>
            <TabStrip ClientIDMode="Predictable"></TabStrip>
            <Toolbar>
                <ighedit:ToolbarImage runat="server" Type="DoubleSeparator" ClientIDMode="Predictable">
                </ighedit:ToolbarImage>
                <ighedit:ToolbarButton runat="server" Type="Bold" ClientIDMode="Predictable"></ighedit:ToolbarButton>
                <ighedit:ToolbarButton runat="server" Type="Italic" ClientIDMode="Predictable"></ighedit:ToolbarButton>
                <ighedit:ToolbarButton runat="server" Type="Underline" ClientIDMode="Predictable">
                </ighedit:ToolbarButton>
                <ighedit:ToolbarButton runat="server" Type="Strikethrough" ClientIDMode="Predictable">
                </ighedit:ToolbarButton>
                <ighedit:ToolbarImage runat="server" Type="Separator" ClientIDMode="Predictable">
                </ighedit:ToolbarImage>
                <ighedit:ToolbarButton runat="server" Type="Subscript" ClientIDMode="Predictable">
                </ighedit:ToolbarButton>
                <ighedit:ToolbarButton runat="server" Type="Superscript" ClientIDMode="Predictable">
                </ighedit:ToolbarButton>
                <ighedit:ToolbarImage runat="server" Type="Separator" ClientIDMode="Predictable">
                </ighedit:ToolbarImage>
                <ighedit:ToolbarButton runat="server" Type="Cut" ClientIDMode="Predictable"></ighedit:ToolbarButton>
                <ighedit:ToolbarButton runat="server" Type="Copy" ClientIDMode="Predictable"></ighedit:ToolbarButton>
                <ighedit:ToolbarButton runat="server" Type="Paste" ClientIDMode="Predictable"></ighedit:ToolbarButton>
                <ighedit:ToolbarImage runat="server" Type="Separator" ClientIDMode="Predictable">
                </ighedit:ToolbarImage>
                <ighedit:ToolbarButton runat="server" Type="Undo" ClientIDMode="Predictable"></ighedit:ToolbarButton>
                <ighedit:ToolbarButton runat="server" Type="Redo" ClientIDMode="Predictable"></ighedit:ToolbarButton>
                <ighedit:ToolbarImage runat="server" Type="Separator" ClientIDMode="Predictable">
                </ighedit:ToolbarImage>
                <ighedit:ToolbarButton runat="server" Type="JustifyLeft" ClientIDMode="Predictable">
                </ighedit:ToolbarButton>
                <ighedit:ToolbarButton runat="server" Type="JustifyCenter" ClientIDMode="Predictable">
                </ighedit:ToolbarButton>
                <ighedit:ToolbarButton runat="server" Type="JustifyRight" ClientIDMode="Predictable">
                </ighedit:ToolbarButton>
                <ighedit:ToolbarButton runat="server" Type="JustifyFull" ClientIDMode="Predictable">
                </ighedit:ToolbarButton>
                <ighedit:ToolbarImage runat="server" Type="Separator" ClientIDMode="Predictable">
                </ighedit:ToolbarImage>
                <ighedit:ToolbarButton runat="server" Type="Indent" ClientIDMode="Predictable"></ighedit:ToolbarButton>
                <ighedit:ToolbarButton runat="server" Type="Outdent" ClientIDMode="Predictable">
                </ighedit:ToolbarButton>
                <ighedit:ToolbarImage runat="server" Type="Separator" ClientIDMode="Predictable">
                </ighedit:ToolbarImage>
                <ighedit:ToolbarButton runat="server" Type="UnorderedList" ClientIDMode="Predictable">
                </ighedit:ToolbarButton>
                <ighedit:ToolbarButton runat="server" Type="OrderedList" ClientIDMode="Predictable">
                </ighedit:ToolbarButton>
                <ighedit:ToolbarImage runat="server" Type="Separator" ClientIDMode="Predictable">
                </ighedit:ToolbarImage>
                <ighedit:ToolbarDialogButton runat="server" Type="InsertRule" ClientIDMode="Predictable">
                    <Dialog InternalDialogType="InsertRule"></Dialog>
                </ighedit:ToolbarDialogButton>
                <ighedit:ToolbarImage runat="server" Type="RowSeparator" ClientIDMode="Predictable">
                </ighedit:ToolbarImage>
                <ighedit:ToolbarImage runat="server" Type="DoubleSeparator" ClientIDMode="Predictable">
                </ighedit:ToolbarImage>
                <ighedit:ToolbarDialogButton runat="server" Type="FontColor" ClientIDMode="Predictable">
                </ighedit:ToolbarDialogButton>
                <ighedit:ToolbarDialogButton runat="server" Type="FontHighlight" ClientIDMode="Predictable">
                </ighedit:ToolbarDialogButton>
                <ighedit:ToolbarDialogButton runat="server" Type="SpecialCharacter" ClientIDMode="Predictable">
                    <Dialog InternalDialogType="SpecialCharacterPicker" Type="InternalWindow"></Dialog>
                </ighedit:ToolbarDialogButton>
                <ighedit:ToolbarMenuButton runat="server" Type="InsertTable" ClientIDMode="Predictable">
                    <Menu ClientIDMode="Predictable">
                        <ighedit:HtmlBoxMenuItem runat="server" Act="TableProperties" ClientIDMode="Predictable">
                            <Dialog InternalDialogType="InsertTable" ClientIDMode="Predictable"></Dialog>
                        </ighedit:HtmlBoxMenuItem>
                        <ighedit:HtmlBoxMenuItem runat="server" Act="InsertColumnRight" ClientIDMode="Predictable">
                        </ighedit:HtmlBoxMenuItem>
                        <ighedit:HtmlBoxMenuItem runat="server" Act="InsertColumnLeft" ClientIDMode="Predictable">
                        </ighedit:HtmlBoxMenuItem>
                        <ighedit:HtmlBoxMenuItem runat="server" Act="InsertRowAbove" ClientIDMode="Predictable">
                        </ighedit:HtmlBoxMenuItem>
                        <ighedit:HtmlBoxMenuItem runat="server" Act="InsertRowBelow" ClientIDMode="Predictable">
                        </ighedit:HtmlBoxMenuItem>
                        <ighedit:HtmlBoxMenuItem runat="server" Act="DeleteRow" ClientIDMode="Predictable">
                        </ighedit:HtmlBoxMenuItem>
                        <ighedit:HtmlBoxMenuItem runat="server" Act="DeleteColumn" ClientIDMode="Predictable">
                        </ighedit:HtmlBoxMenuItem>
                        <ighedit:HtmlBoxMenuItem runat="server" Act="IncreaseColspan" ClientIDMode="Predictable">
                        </ighedit:HtmlBoxMenuItem>
                        <ighedit:HtmlBoxMenuItem runat="server" Act="DecreaseColspan" ClientIDMode="Predictable">
                        </ighedit:HtmlBoxMenuItem>
                        <ighedit:HtmlBoxMenuItem runat="server" Act="IncreaseRowspan" ClientIDMode="Predictable">
                        </ighedit:HtmlBoxMenuItem>
                        <ighedit:HtmlBoxMenuItem runat="server" Act="DecreaseRowspan" ClientIDMode="Predictable">
                        </ighedit:HtmlBoxMenuItem>
                        <ighedit:HtmlBoxMenuItem runat="server" Act="CellProperties" ClientIDMode="Predictable">
                            <Dialog InternalDialogType="CellProperties" ClientIDMode="Predictable"></Dialog>
                        </ighedit:HtmlBoxMenuItem>
                        <ighedit:HtmlBoxMenuItem runat="server" Act="TableProperties" ClientIDMode="Predictable">
                            <Dialog InternalDialogType="ModifyTable" ClientIDMode="Predictable"></Dialog>
                        </ighedit:HtmlBoxMenuItem>
                    </Menu>
                </ighedit:ToolbarMenuButton>
                <ighedit:ToolbarButton runat="server" Type="ToggleBorders" ClientIDMode="Predictable">
                </ighedit:ToolbarButton>
                <ighedit:ToolbarImage runat="server" Type="Separator" ClientIDMode="Predictable">
                </ighedit:ToolbarImage>
                <ighedit:ToolbarButton runat="server" Type="InsertLink" ClientIDMode="Predictable">
                </ighedit:ToolbarButton>
                <ighedit:ToolbarButton runat="server" Type="RemoveLink" ClientIDMode="Predictable">
                </ighedit:ToolbarButton>
                <ighedit:ToolbarImage runat="server" Type="Separator" ClientIDMode="Predictable">
                </ighedit:ToolbarImage>
                <ighedit:ToolbarButton runat="server" Type="Save" RaisePostback="True" ClientIDMode="Predictable">
                </ighedit:ToolbarButton>
                <ighedit:ToolbarUploadButton runat="server" Type="Open" ClientIDMode="Predictable">
                    <Upload Mode="File" Filter="*.htm,*.html,*.asp,*.aspx" Height="350px" Width="500px"
                        ClientIDMode="Predictable"></Upload>
                </ighedit:ToolbarUploadButton>
                <ighedit:ToolbarButton runat="server" Type="Preview" ClientIDMode="Predictable">
                </ighedit:ToolbarButton>
                <ighedit:ToolbarImage runat="server" Type="Separator" ClientIDMode="Predictable">
                </ighedit:ToolbarImage>
                <ighedit:ToolbarDialogButton runat="server" Type="FindReplace" ClientIDMode="Predictable">
                    <Dialog InternalDialogType="FindReplace"></Dialog>
                </ighedit:ToolbarDialogButton>
                <ighedit:ToolbarDialogButton runat="server" Type="InsertBookmark" ClientIDMode="Predictable">
                    <Dialog InternalDialogType="InsertBookmark"></Dialog>
                </ighedit:ToolbarDialogButton>
                <ighedit:ToolbarUploadButton runat="server" Type="InsertImage" ClientIDMode="Predictable">
                    <Upload Height="420px" Width="500px" ClientIDMode="Predictable"></Upload>
                </ighedit:ToolbarUploadButton>
                <ighedit:ToolbarUploadButton runat="server" Type="InsertFlash" ClientIDMode="Predictable">
                    <Upload Mode="Flash" Filter="*.swf" Height="440px" Width="500px" ClientIDMode="Predictable">
                    </Upload>
                </ighedit:ToolbarUploadButton>
                <ighedit:ToolbarUploadButton runat="server" Type="InsertWindowsMedia" ClientIDMode="Predictable">
                    <Upload Mode="WindowsMedia" Filter="*.asf,*.wma,*.wmv,*.wm,*.avi,*.mpg,*.mpeg,*.m1v,*.mp2,*.mp3,*.mpa,*.mpe,*.mpv2,*.m3u,*.mid,*.midi,*.rmi,*.aif,*.aifc,*.aiff,*.au,*.snd,*.wav,*.cda,*.ivf"
                        Height="400px" Width="500px" ClientIDMode="Predictable"></Upload>
                </ighedit:ToolbarUploadButton>
                <ighedit:ToolbarDialogButton runat="server" Type="Help" ClientIDMode="Predictable">
                    <Dialog InternalDialogType="Text"></Dialog>
                </ighedit:ToolbarDialogButton>
                <ighedit:ToolbarButton runat="server" Type="CleanWord" ClientIDMode="Predictable">
                </ighedit:ToolbarButton>
                <ighedit:ToolbarButton runat="server" Type="WordCount" ClientIDMode="Predictable">
                </ighedit:ToolbarButton>
                <ighedit:ToolbarButton runat="server" Type="PasteHtml" ClientIDMode="Predictable">
                </ighedit:ToolbarButton>
                <ighedit:ToolbarMenuButton runat="server" Type="Zoom" ClientIDMode="Predictable">
                    <Menu ClientIDMode="Predictable">
                        <ighedit:HtmlBoxMenuItem runat="server" Act="Zoom25" ClientIDMode="Predictable">
                        </ighedit:HtmlBoxMenuItem>
                        <ighedit:HtmlBoxMenuItem runat="server" Act="Zoom50" ClientIDMode="Predictable">
                        </ighedit:HtmlBoxMenuItem>
                        <ighedit:HtmlBoxMenuItem runat="server" Act="Zoom75" ClientIDMode="Predictable">
                        </ighedit:HtmlBoxMenuItem>
                        <ighedit:HtmlBoxMenuItem runat="server" Act="Zoom100" ClientIDMode="Predictable">
                        </ighedit:HtmlBoxMenuItem>
                        <ighedit:HtmlBoxMenuItem runat="server" Act="Zoom200" ClientIDMode="Predictable">
                        </ighedit:HtmlBoxMenuItem>
                        <ighedit:HtmlBoxMenuItem runat="server" Act="Zoom300" ClientIDMode="Predictable">
                        </ighedit:HtmlBoxMenuItem>
                        <ighedit:HtmlBoxMenuItem runat="server" Act="Zoom400" ClientIDMode="Predictable">
                        </ighedit:HtmlBoxMenuItem>
                        <ighedit:HtmlBoxMenuItem runat="server" Act="Zoom500" ClientIDMode="Predictable">
                        </ighedit:HtmlBoxMenuItem>
                        <ighedit:HtmlBoxMenuItem runat="server" Act="Zoom600" ClientIDMode="Predictable">
                        </ighedit:HtmlBoxMenuItem>
                    </Menu>
                </ighedit:ToolbarMenuButton>
                <ighedit:ToolbarButton runat="server" Type="TogglePositioning" ClientIDMode="Predictable">
                </ighedit:ToolbarButton>
                <ighedit:ToolbarButton runat="server" Type="BringForward" ClientIDMode="Predictable">
                </ighedit:ToolbarButton>
                <ighedit:ToolbarButton runat="server" Type="SendBackward" ClientIDMode="Predictable">
                </ighedit:ToolbarButton>
                <ighedit:ToolbarImage runat="server" Type="RowSeparator" ClientIDMode="Predictable">
                </ighedit:ToolbarImage>
                <ighedit:ToolbarImage runat="server" Type="DoubleSeparator" ClientIDMode="Predictable">
                </ighedit:ToolbarImage>
                <ighedit:ToolbarDropDown runat="server" Type="FontName" ClientIDMode="Predictable">
                </ighedit:ToolbarDropDown>
                <ighedit:ToolbarDropDown runat="server" Type="FontSize" ClientIDMode="Predictable">
                </ighedit:ToolbarDropDown>
                <ighedit:ToolbarDropDown runat="server" Type="FontFormatting" ClientIDMode="Predictable">
                </ighedit:ToolbarDropDown>
                <ighedit:ToolbarDropDown runat="server" Type="FontStyle" ClientIDMode="Predictable">
                </ighedit:ToolbarDropDown>
                <ighedit:ToolbarDropDown runat="server" Type="Insert" ClientIDMode="Predictable">
                    <Items>
                        <ighedit:ToolbarDropDownItem runat="server" Act="Greeting" ClientIDMode="Predictable">
                        </ighedit:ToolbarDropDownItem>
                        <ighedit:ToolbarDropDownItem runat="server" Act="Signature" ClientIDMode="Predictable">
                        </ighedit:ToolbarDropDownItem>
                    </Items>
                </ighedit:ToolbarDropDown>
            </Toolbar>
            <ProgressBar ClientIDMode="Predictable"></ProgressBar>
            <RightClickMenu ClientIDMode="Predictable">
                <ighedit:HtmlBoxMenuItem runat="server" Act="Cut" ClientIDMode="Predictable">
                </ighedit:HtmlBoxMenuItem>
                <ighedit:HtmlBoxMenuItem runat="server" Act="Copy" ClientIDMode="Predictable">
                </ighedit:HtmlBoxMenuItem>
                <ighedit:HtmlBoxMenuItem runat="server" Act="Paste" ClientIDMode="Predictable">
                </ighedit:HtmlBoxMenuItem>
                <ighedit:HtmlBoxMenuItem runat="server" Act="PasteHtml" ClientIDMode="Predictable">
                </ighedit:HtmlBoxMenuItem>
                <ighedit:HtmlBoxMenuItem runat="server" Act="CellProperties" ClientIDMode="Predictable">
                    <Dialog InternalDialogType="CellProperties" ClientIDMode="Predictable"></Dialog>
                </ighedit:HtmlBoxMenuItem>
                <ighedit:HtmlBoxMenuItem runat="server" Act="TableProperties" ClientIDMode="Predictable">
                    <Dialog InternalDialogType="ModifyTable" ClientIDMode="Predictable"></Dialog>
                </ighedit:HtmlBoxMenuItem>
                <ighedit:HtmlBoxMenuItem runat="server" Act="InsertImage" ClientIDMode="Predictable">
                </ighedit:HtmlBoxMenuItem>
            </RightClickMenu>
            <TextWindow ClientIDMode="Predictable"></TextWindow>
        </ighedit:WebHtmlEditor>
        </form>
        <input id="Button2" type="button" value="button" onclick="return Button2_onclick()" />
    </body>
    </html>
    

     


Reply Children
No Data