LibCopyPaste

LibCopyPaste

2.7k Downloads

Functions:
Copy(title, text)
title - Title of the copy window
text - Text to be copied in the window

Paste(title, callback)
title - Title of the window
callback - Function that will be run when the Okay button is clicked on the paste window. The text entered will be passed as the first argument.

local LibCopyPaste = LibStub("LibCopyPaste-1.0")

LibCopyPaste:Copy("Window Title Here", "Text to be copied")
LibCopyPaste:Paste("Window Title Here", function(text)
     print(text) -- Prints the text entered by the user
end)