• Login
Community
  • Login

Change Color of Hyperlinks in Text File (Not Just on Hover)

Scheduled Pinned Locked Moved General Discussion
6 Posts 4 Posters 1.4k Views
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • D
    DeeTNBlazer
    last edited by Feb 23, 2024, 8:16 PM

    Hello,

    I am wanting to find a method to be able to change the text color of all hyperlinks in text files from the standard black, to a color of my choosing.

    I know I can do this on hover, but my goal is to change the color of all hyperlinks in a text file so they are a different color before I even hover over them.

    Is there any code, any macro, LuaScript, code, any other script, or any plugin that anyone is aware of or can make so I could do this?

    I have searched the internet for the past many hours and haven’t been able to find a solution to this.

    I greatly appreciate any help.

    Thanks

    A P 2 Replies Last reply Feb 24, 2024, 6:05 PM Reply Quote 0
    • A Alan Kilborn referenced this topic on Feb 24, 2024, 6:04 PM
    • A
      Alan Kilborn @DeeTNBlazer
      last edited by Feb 24, 2024, 6:05 PM

      DUPLICATE

      1 Reply Last reply Reply Quote 1
      • P
        PeterJones @DeeTNBlazer
        last edited by PeterJones Feb 24, 2024, 9:21 PM Feb 24, 2024, 9:21 PM

        @DeeTNBlazer said in Change Color of Hyperlinks in Text File (Not Just on Hover):

        am wanting to find a method to be able to change the text color of all hyperlinks in text files from the standard black, to a color of my choosing.

        Notepad++ does not have that feature built in.

        Try the Enhance Any Lexer plugin, defining a color/regex pair like 0x0000FF = https?://(\S)*? for text files to make normal links red. (The color and the exact regex are, of course, up to you to define to meet your own exact needs.)

        D 1 Reply Last reply Feb 26, 2024, 4:21 AM Reply Quote 2
        • D
          DeeTNBlazer @PeterJones
          last edited by DeeTNBlazer Feb 26, 2024, 4:27 AM Feb 26, 2024, 4:21 AM

          @PeterJones said in Change Color of Hyperlinks in Text File (Not Just on Hover):

          0x0000FF = https?://(\S)*?

          Hi, thank you for the reply. I installed that plugin and added that code, however, it only made the first part of the URL red, the https:// part. - Is there anyway to have the code detect the full URL and make it all red?

          Maybe a way to signal the start of the URL with https:// and the end of it terminating with a slash / - So a link like this (minus the space) https:// link/ would be fully red.

          If that is possible, please let me know.

          Thanks!

          E 1 Reply Last reply Feb 26, 2024, 8:03 AM Reply Quote 0
          • E
            Ekopalypse @DeeTNBlazer
            last edited by Feb 26, 2024, 8:03 AM

            @DeeTNBlazer

            removing the last ? should give you the desired result.
            But be aware that EnhanceAnyLexer works on lexer-specific documents for which it has been defined, ie,
            if you have defined it for normal text,
            it will not color it for, say, Python or C or php code etc…

            1 Reply Last reply Reply Quote 3
            • D
              DeeTNBlazer
              last edited by Feb 26, 2024, 3:02 PM

              The two solutions given here solved my issue. Thank you so much to the contributors!!

              1 Reply Last reply Reply Quote 1
              5 out of 6
              • First post
                5/6
                Last post
              The Community of users of the Notepad++ text editor.
              Powered by NodeBB | Contributors