Thread Tools Display Modes
04-25-23, 06:45 AM   #1
A Flamescale Wyrmkin
Benalish's Avatar
Join Date: Dec 2012
Posts: 116
Editbox and links

How can I make an editbox capable to accept link from spell and item? I just need it to be plain text, without the text being formatted.
  Reply With Quote
04-25-23, 09:46 AM   #2
I did that?
Fizzlemizz's Avatar
Premium Member
AddOn Author - Click to view addons
Join Date: Dec 2011
Posts: 1,735
Lua Code:
  1. local f = CreateFrame("EditBox", nil, UIParent, "InputBoxTemplate")
  2. f:SetSize(300, 60)
  3. f:SetPoint("CENTER")
  4. f:SetHyperlinksEnabled(true)
  5. f:SetText("Display a link: " .. GetSpellLink(2061) .. " and see what happens?")
  7. f:SetScript("OnHyperlinkEnter", function(self, link, text, region, left, bottom, width, height)
  8.     GameTooltip:SetOwner(self, "ANCHOR_CURSOR_RIGHT")
  9.     GameTooltip:SetHyperlink(link)
  10.     GameTooltip:Show()
  11. end)
  13. f:SetScript("OnHyperlinkLeave", function(self)
  14.     GameTooltip:Hide()
  15. end)
Maintainer of Discord Unit Frames and Discord Art.
Author of FauxMazzle, FauxMazzleHUD and Move Pad Plus.
  Reply With Quote

WoWInterface » Developer Discussions » Lua/XML Help » Editbox and links

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off