How to make a HTML link?

How to make a HTML link?

6
NewbieNewbie
6

    Oct 15, 2005#1

    In UEStudio, is there an easy way to "linkify" regular text? That is, is there an easy way to select any text and turn it into an HTML link without having to manually type <a href=URL>NAME</a>?

    Thanks

    6,675585
    Grand MasterGrand Master
    6,675585

      Oct 16, 2005#2

      There is no standard button for this in the toolbar. But you can create a macro for this task and run the macro with a hotkey whenever you need it.

      Solution 1:

      Code: Select all

      InsertMode
      ColumnModeOff
      HexOff
      IfSel
      Clipboard 9
      Cut 
      "<a href="">"
      Paste 
      "</a>"
      ClearClipboard
      Clipboard 0
      Else
      "<a href=""></a>"
      EndIf
      Solution 2: This one asks for the URL.

      Code: Select all

      InsertMode
      ColumnModeOff
      HexOff
      IfSel
      Clipboard 9
      Cut 
      "<a href=""
      GetString "Enter the url:"
      "">"
      Paste 
      "</a>"
      ClearClipboard
      Clipboard 0
      Else
      "<a href=""
      GetString "Enter the url:"
      ""></a>"
      EndIf
      Look also at Products - Extra Downloads - Macros & scripts on UltraEdit website. There are some useful macros for HTML editing.

      6
      NewbieNewbie
      6

        Oct 17, 2005#3

        Awesome.. thanks a lot :)

        I didn't even know there were downloadable macros on the site. I'll check them out, and thank you for your suggestions as well.

        6,675585
        Grand MasterGrand Master
        6,675585

          Apr 11, 2007#4

          Converting a text into an URL could be also done faster with a template as I do now.

          Example 1: Template "Convert to URL"

          <a href="[$replace$]">[$replace$]</a>


          Example 2: Template "Insert URL"

          <a href="^">[$replace$]</a>


          Example 3: Template "Convert to mail URL"

          <a href="mailto:[$replace$]">[$replace$]</a>


          Maybe this can be also done with customized HTML toolbar commands, but I use the templates with hotkeys because it is faster.
          Best regards from an UC/UE/UES for Windows user from Austria

          1
          NewbieNewbie
          1

            Sep 22, 2007#5

            I added something I found useful to your script.

            1) Made it open a new tab when you click on the link.

            2) You can input the description text .

            Code: Select all

            InsertMode
            ColumnModeOff
            HexOff
            IfSel
            Clipboard 9
            Cut 
            "<a href=""
            GetString "Enter the url:"
            "">"
            Paste 
            "</a>"
            ClearClipboard
            Clipboard 0
            Else
            "<a href=""
            GetString "Enter the url:"
            "" target=\rdblquote _blank\rdblquote >""
            GetString "Enter the display text:"
            ""</a>"
            EndIf