emoji picker

main
alexanderroese 2024-07-16 22:08:11 +02:00
parent 4f7dce663a
commit dedee9af47
1 changed files with 17 additions and 2 deletions

View File

@ -407,6 +407,21 @@
globalInputFormsObjValues[id][key] = value;
console.log("SHX_IFC_setCurrentValue", id, key, value)
// add the <emoji-picker></emoji-picker> element after the text input is rendered
if (key === "text1") {
const emojiPicker = document.createElement("emoji-picker")
emojiPicker.classList = "light"
emojiPicker.style.width = "100%"
emojiPicker.addEventListener("emoji-click", (e) => {
insertText(document.querySelector("#shx-text1"), e.detail.unicode);
});
console.log("add picker here")
document.getElementsByClassName("shx-emoji-picker-popup")[0].appendChild(emojiPicker)
}
}
function SHX_IFC_genTextInput(inputID, labelText, inputName, inputVal, section_id, maxLength = 24) {
@ -1059,8 +1074,8 @@
window.addEventListener("DOMContentLoaded", () => {
setTimeout(() => {
/*
console.log("timeout")
const emojiPicker = document.createElement("emoji-picker")
emojiPicker.classList = "light"
emojiPicker.style.width = "100%"
@ -1072,7 +1087,7 @@
console.log("add picker")
document.getElementsByClassName("shx-emoji-picker-popup")[0].appendChild(emojiPicker)
*/
/*