Insert a A Link

Last post 08-01-2008, 12:56 AM by Adam. 2 replies.
Sort Posts: Previous Next
  •  07-29-2008, 4:14 AM 42610

    Insert a A Link

    Hello,
     
    i add a Tab to the Link function, now my problem is, how can i insert the link? in the Editor? Because theres a Iframe , and is there a other way then editor.ExecCommand("insertlink"....)??
     
    When i try to get the Editor with:
     
    var editor = Window_GetDialogArguments(window); 
     
    function Window_GetDialogArguments(win)
        {
            var top=win.top;
            if(top.dialogArguments)
                return top.dialogArguments;
            var opener=top.opener;
            if(opener==null)
                return top.document._dialog_arguments;
            return opener.document._dialog_arguments;
        }
     
    It Doesnt Work, 
     
    When i do this with:
     
    var editor1 = document.getElementById('CE_Editor1_ID');
     
    It also doesnt work?
  •  07-29-2008, 4:28 AM 42611 in reply to 42610

    Re: Insert a A Link

    Ok. It works with:
     
    var editor1 = parent.document.getElementById('CE_Editor1_ID'); 
     
     
    When i Exec:
     
    editor1.ExecCommand("insertlink",false,"http://test.de");


    I think it insert the Link But when i use  the Function after this:
     
    Window_CloseDialog(window);
     
    The window closed correctly but it remove the Link, how can I close the Window But the Link should be always in the Editor?
  •  08-01-2008, 12:56 AM 42671 in reply to 42611

    Re: Insert a A Link

    ddanninger,
     
    1. Use insertlink in the same page of editor.
     
    editor1.ExecCommand("insertlink",false,http://CuteSoft.net);
     
    2. Use insertlink in the dialog.
     
    Add the following code:
     
    Window_SetDialogReturnValue(window,false);
    Window_CloseDialog(window);
     
    Keep me posted

    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