Hello togehter,
first time in this forum-section, so i do not know what i have to expect 😁.
Not sure if this issue is for this section or not.
I have noticed that the RTE has one major disadvantage. For example, if you want to send the entered text in the RTE using the "ENTER" key, this is not possible.
It is also clear to me why this is not possible since you can skip the line by pressing the ENTER key.
BUT.....
If you want to bypass the system with the help of a key combination, for example, this is only possible to a limited extent.
In the IDEAL CASE, the "CRTL" key would be the best choice ---> "CRTL" + "ENTER" ----> to complete the entry.
I found that both the "TAB" key and the key directly below "ESC" work in combination with the "ENTER" key, with the TAB + ENTER combination not a good choice.
Are there any other tips or advice?
I had the idea to modify the function of the "ENTER" key in the RTE by trying to simulate a permanent actuation of the button in question, so that the system assumes that not just the ENTER key but two keys are pressed to change the function of the "ENTER" key. Unfortunately, that didn't quite work.
(setInterval) / (setTimeout) / (event.keyCode = 94) / (event.key.charCodeAt (0))
I have worked with all these means.
Ultimately, I stayed with the fact that I stick to the combination ----> ["°" + "ENTER"].
But it would be nice if you could use the "CRTL" button for this function, which has not been used yet.
I have also found this LINK .....
https://www.wix.com/corvid/forum/community-discussion/chat-submit-by-enter
So as you can see, it is already a known problem, but still nothing has changed. 😪 😪 😪
Hey 🖐
Why do you think that pressing the Enter key won't work? Did you try to use a combination to send the rich box value?
$w("#myElement").onKeyPress( (event) => { let ctrl = event.ctrlKey; if (ctrl && event.key === 'Enter') { // send the rich box value } });
Wix Realtime API Tutorial.
I'm not sure the event handler will register the two keys at the same time, try it out and let me know if it worked.
Ahmad