Insert emoji character to input

This commit is contained in:
Andy Smith
2025-10-27 13:37:53 -05:00
parent 9711a8e1e5
commit d72136ae92
3 changed files with 13 additions and 3 deletions
@@ -0,0 +1,10 @@
import { Controller } from "@hotwired/stimulus"
export default class extends Controller {
static targets = [ "input" ]
insertEmoji(event) {
const emojiChar = event.target.getAttribute("data-emoji")
this.inputTarget.value = emojiChar
}
}