-
Notifications
You must be signed in to change notification settings - Fork 317
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to save Emojis to MySQL #135
Comments
❤️ should be : heart : but github replaced it with icon |
Set your input field to accept Unicode by adding |
There are several ways to accomplish this. Instead of send your input value, you can send the value of the input that is converted in the nuew input that has the class "emoji-wysiwyg-editor". Another way is getting the alt of the imgs of the emojis. For example, this will have the emoji : hearth : and you can saved it in database. |
To save the emojis into the db set the collation of the field to "utf8mb4_general_ci" And to read them after a MySQL select, use
right after the mysqli_connect (or whatever type of connection you are using). Hope this helps someone |
To convert the unicode versions back into the same images you see in the Picker, you can do:
Replace |
I want to get Unicode from input or textarea? but getting as "Hello 😃", so I can store the Unicode in the database and get it to convert to image using EmojiPicker methods. |
Am using ci4. At first i was getting ???? for the emojis in DB. 'charset' => 'utf8mb4', |
Save my life! |
Demo works fine but on Submit form (to .php) I am not getting tags like ❤️ or :cars: but UTF emojis. I would like to use images (not UTF characters) and I don't know how to intercept form field with emoji-tags, save them and later display that post with images.
The demo simply replaces graphics emojis with UTF which is not what I need.
I want text box to return me:
Hello this is ❤️ and it looks lovely --> (form submit) --> php
then I would save this to DB
later I would read from db and replace ❤️ with correct emoji image
Can someone help?
The text was updated successfully, but these errors were encountered: