For more information, see how to insert an emoticon in textarea.

Source: Internet
Author: User
For more information, see document. createElement ("img") implements the function of adding emoticon to textarea, but the problem is that emoticon cannot be stored in the database. the emoticon will be lost every time you browse the post, so I want to ask if there are any good methods?


Reply to discussion (solution)

Save the image URL to the database.

This step has been done, but how can I determine the position of the emoticon image in the message posted by the contact and display it according to the original text?

Isn't this a problem? You can use open-source editors such as kindedit and CKEdit, which is very convenient.

What attributes can be set with p to display the textarea effect? You can also display the image.

Textarea. innerHTML = "img src#....jpg"

Fsfsd

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.