is there a chance of getting the emote/emoji/kaomoji buttons to insert at the cursor instead of at the end of the textbox? pretty much nowhere else works like that and it's kind of awkward adding things to a post as it stands, very fiddlyyou just split the textbox into two substrings, one with stuff before the cursor and one with stuff afterand set the textbox contents to be the text from the button concatenated into the middle of those two strins instead of just doing it at the end of the textbox contentshttps://stackoverflow.com/a/11077016Marked for deletion (Old)
if someone teaches me what I need to change in https://static.heyuri.net/js/addemotes.js , sureit's black magic to me...
all the spots with COMMENT.value+= (whatever)should be changednot at home now, I might be able to make the exact changes in like 7 hours lol ┐(゚~゚)┌
you need to store the caret position, splice the kamoji in at that point, add the length of the kaomoji to the stored position, then set the new position to the sum.https://developer.mozilla.org/en-US/docs/Web/API/CaretPosition
actually the selection range api is the safer way to do it. https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/setSelectionRange
okay, I think I did it, here's the edited scripthttps://up.heyuri.net/src/3512.txtdidn't use the setSelectionRange API, I basically just applied that StackOverflow answernot 100% sure I didn't break anything since testing was kind of awkward on a saved static page (a lot of stuff was broken just because of the save)but I don't think I did
the changes are live, thanks!━━━(・∀・)━━━