Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
create hyperlink with alternative text on clipboard
#3
Thank you, it works!

One small detail, the function PasteHtml seems to add a newline character at the end of the selection (or clipboardcontents when using .setclip instead of .setsel).  Is it possible to prevent this?

This is the code I have:

Macro LinkFromClipboardText
Code:
Copy      Help
str s.getclip  ;; get url from the clipboard
str html.from("<a href=''" s "''>here</a>")  ;;create the link

str sh.format("Version:1.0[]StartHTML:00000033[]%s" html)
sh.setclip("HTML Format")


Messages In This Thread
RE: create hyperlink with alternative text on clipboard - by artuur9 - 05-15-2020, 08:18 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)