Insert link problem

Last post 12-27-2011, 2:58 PM by JesseGrunn. 5 replies.
Sort Posts: Previous Next
  •  12-18-2011, 2:52 PM 72067

    Insert link problem

    Hi there,
     
    How can I disable CE for inserting the location of my page when inserting a link. 
     
    For example, I know it's not correct, but if I click "Insert link" on the demo page (http://cutesoft.net/example/general.aspx) and fill in a word like "Test", the base href is not applied. In HTML-mode it just says <a href="Test">Test</a>. That's what I want.
     
    In my case CE makes <a href="http://localhost/currentpage/Test">Test</a>
     
    I know it should be possible, but how?
  •  12-19-2011, 5:56 AM 72072 in reply to 72067

    Re: Insert link problem

    Hi JesseGrunn,
     
    Get the full path because you set URLType="absolute"
     
       <CE:Editor ID="Editor1" runat="server" URLType="absolute" /> 
     
    Regards,
     
    Ken
  •  12-19-2011, 7:48 AM 72090 in reply to 72072

    Re: Insert link problem

    Hi Ken,
     
    Thanks for your quick reply.
     
    Now it works, however, I need the images to be absolute. So when I insert an image, it now is relative and I really need them to be absolute.
    Any idea how to accomplish that?
     
    Kind regards,
     
    Jesse
  •  12-19-2011, 11:12 AM 72234 in reply to 72090

    Re: Insert link problem

    Anyone?
  •  12-20-2011, 6:13 AM 72369 in reply to 72234

    Re: Insert link problem

    Hi JesseGrunn,
     
    For now have not the option to set the image/link separate. Try use html filter, change the red part to your host name.
     
    Also, you can replace the code at server side when you get the content from the editor. 
     
    <%@ Page Language="C#" %>
    <%@ Register Namespace="CuteEditor" Assembly="CuteEditor" TagPrefix="CE" %>
    <!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 id="Head1" runat="server">
        <title>example</title>
    </head>
    <body>
        <form id="form1" runat="server">
            <div id="div1">
                <CE:Editor ID="editor1" runat="server" URLType="absolute">
                </CE:Editor>
            </div>
        </form>
    </body>
    </html>
    <script type="text/javascript">      
    function CuteEditor_FilterHTML(editor,code)   
    {   
        return code.split('<a href="http://localhost:14980/Editor/').join('<a href="');
    }   
    function CuteEditor_FilterCode(editor,code)   
    {   
        return code.split('<a href="http://localhost:14980/Editor/').join('<a href="');
    }   
    </script>
     
    Regards,
     
    Ken 
  •  12-27-2011, 2:58 PM 72432 in reply to 72369

    Re: Insert link problem

    Thanks Kenneth, this works like a charm!
View as RSS news feed in XML