0
Chat Message with HTML
Hello folks, I am coding a webskte that has a chat, but I found a little problem: the user's input. The users can input text messages, images, files and videos and I dunno what tag use in this case. For example, if I put an input, I need to inform the type, so, if the type be "text", the tag will not accept "files" and so on. Please, does someone know how to make the tag identify the message's type and accept it? Should I use javascript? Does input tag the better fpr this case or I should put an <p> tag with "contenteditable" property?
1 Odpowiedź
+ 4
There is no such thing. You use custom buttons for other types of inputs. You can create a small button next to your input to attach files to the message.
It is also impossible to make a chat application with HTML, unless you're planning to talk to youself. Data is saved into a server, and there is no way to do that with HTML and VanillaJS only.