emoji picker
parent
4d1a9b12e4
commit
e9ec73432d
|
@ -416,6 +416,22 @@
|
||||||
globalInputFormsObjValues[id][key] = value;
|
globalInputFormsObjValues[id][key] = value;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function onClickEmojiPickerButton() {
|
||||||
|
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");
|
||||||
|
|
||||||
|
document.getElementsByClassName("shx-emoji-picker-popup")[0].appendChild(emojiPicker);
|
||||||
|
|
||||||
|
document.querySelector('.shx-emoji-picker-popup').classList.toggle('shown')
|
||||||
|
}
|
||||||
|
|
||||||
function SHX_IFC_genTextInput(inputID, labelText, inputName, inputVal, section_id, maxLength = 24) {
|
function SHX_IFC_genTextInput(inputID, labelText, inputName, inputVal, section_id, maxLength = 24) {
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
document.querySelector(`#${inputID}`).addEventListener('input',(e)=>{
|
document.querySelector(`#${inputID}`).addEventListener('input',(e)=>{
|
||||||
|
@ -434,22 +450,6 @@
|
||||||
});
|
});
|
||||||
}, 1000);
|
}, 1000);
|
||||||
|
|
||||||
function onClickEmojiPickerButton() {
|
|
||||||
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");
|
|
||||||
|
|
||||||
document.getElementsByClassName("shx-emoji-picker-popup")[0].appendChild(emojiPicker);
|
|
||||||
|
|
||||||
document.querySelector('.shx-emoji-picker-popup').classList.toggle('shown')
|
|
||||||
}
|
|
||||||
|
|
||||||
return `
|
return `
|
||||||
<label class="form__label custom shx-ifc-form_label" for="${inputID}-label">${labelText}</label>
|
<label class="form__label custom shx-ifc-form_label" for="${inputID}-label">${labelText}</label>
|
||||||
<div class="field custom ">
|
<div class="field custom ">
|
||||||
|
|
Loading…
Reference in New Issue