remove link

Last post 09-30-2009, 8:47 AM by Adam. 4 replies.
Sort Posts: Previous Next
  •  09-23-2009, 11:43 PM 55831

    remove link

    hi
     
    how can i remove the link automatically when i input an url/email (remove the link once url/email is input into the cuteeditor panel)
     
    here is the function which kenneth provide me :
     

    <script type="text/javascript">   

    function CuteEditor_FilterHTML(editor,code)   

    {   

     return code.replace(/(<a[^\>]*\>)([\s\S]*)(\<\/a\>)/i, "$2");   

    }   

    function CuteEditor_FilterCode(editor,code)   

    {   

     return code.replace(/(<a[^\>]*\>)([\s\S]*)(\<\/a\>)/i, "$2");   

    }   

    </script> 

     
    i try to make some modification to the function
     

    function CuteEditor_FilterHTML(editor,code)

    {

    var sHTML;

    sHTML=code.replace(/(<a[^\>]*\>)([\s\S]*)(\<\/a\>)/i, "$2");

    editor.setHTML(sHTML);

    }

    function CuteEditor_FilterCode(editor,code)

    {

    var sHTML;

    sHTML=code.replace(/(<a[^\>]*\>)([\s\S]*)(\<\/a\>)/i, "$2");

    editor.setHTML(sHTML);

    }
     
    but everytime i add/select a layer, it will lost focus to that layer.....it unable me to change the text inside the layer (maybe is cause by i reset the HTML)
     
    thanks
  •  09-24-2009, 10:47 PM 55868 in reply to 55831

    Re: remove link

    HI, goh6613 ,
     
    Try
     

    <script type="text/javascript">
    function CuteEditor_FilterHTML(editor,code)

    {

    var sHTML;

    sHTML=code.replace(/(<a[^\>]*\>)([\s\S]*)(\<\/a\>)/i, "$2");  

    editor.setHTML(sHTML);
    return code;
    }

    function CuteEditor_FilterCode(editor,code)

    {

    var sHTML;

    sHTML=code.replace(/(<a[^\>]*\>)([\s\S]*)(\<\/a\>)/i, "$2");  

    editor.setHTML(sHTML);
    return code;
    }
    </script>
     
     
    Regards,
     
    Ken
  •  09-29-2009, 8:52 PM 55954 in reply to 55868

    Re: remove link

    hi kenneth
     
    i follow the sample above, but it not allow me to select the layer (it will lost focus once the item is selected - maybe its caused by we call reset the HTML once we carry out any actions in the layer....)
     
    thanks
  •  09-29-2009, 10:48 PM 55957 in reply to 55954

    Re: remove link

    This is very interesting, I don't want cuteedit automatic create link with any input url too.

    Hope this can resolve. 



    I see in reply box  not automatic create link when I type URL or mail@  How can you do that?

    test:  http://cutesoft.net  www.cutesoft.net   http://www.cutesoft.net  cutesoft@cutesoft.net
  •  09-30-2009, 8:47 AM 55962 in reply to 55957

    Re: remove link

    >>This is very interesting, I don't want cuteedit automatic create link with any input url too.
     
    This is the IE behavior. Right now we don't have the solution to prevent it.
     
    Sorry for the inconvenience.

    asp.net Chat http://cutesoft.net/ASP.NET+Chat/default.aspx
    Web Messenger: http://cutesoft.net/Web-Messenger/default.aspx
    asp.net wysiwyg editor: http://cutesoft.net/ASP.NET+WYSIWYG+Editor/default.aspx
    asp wysiwyg html editor: http://cutesoft.net/ASP
    asp.net Image Gallery: http://cutesoft.net/ASP.NET+Image+Gallery/default.aspx
    Live Support: http://cutesoft.net/live-support/default.aspx

View as RSS news feed in XML