// Name: Wrap Selected Text in Tags
// Description: Wraps selected text in opening and closing tags
// Author: malacon
import "@johnlindquist/kit"
const selectedText = await getSelectedText()
if (!selectedText) {
await div(md("No text selected. Please select some text first."))
exit()
}
const tagName = await arg("Enter tag name:", {
placeholder: "e.g., div, span, strong",
hint: "Enter the HTML tag name (without < >)"
})
const wrappedText = `<${tagName}>${selectedText}</${tagName}>`