Skip to content
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

Unicode Emoji Toolbox Plugin #956

Merged
merged 3 commits into from
Mar 31, 2024
Merged

Unicode Emoji Toolbox Plugin #956

merged 3 commits into from
Mar 31, 2024

Conversation

w8tcha
Copy link
Contributor

@w8tcha w8tcha commented Mar 21, 2024

This PR is based on

#947

This PR adds optional unicode emoji selector in toolbar as a Plugin. The existing emoticon support may not be fit for all use cases so now the user has option to use unicode emojies or image emoticons.

Use it by adding preferred emojies in SCEditor initialization:

sceditor.create(textarea, {
	format: 'bbcode',
	style: 'https://cdn.jsdelivr.net/npm/sceditor@3/minified/themes/content/default.min.css',
	emojis: ['😊', '❤️', '😄'],
        plugins: 'emojis'
});

280264010-358549f5-4611-4409-9514-768764366330

If there are no options set it loads the EmojiMart Picker

emojiMart

@samclarke samclarke added this to the v3.3.0 milestone Mar 31, 2024
src/plugins/emojis.js Outdated Show resolved Hide resolved
Changes spaces to tabs, adds a few spaces before opening brackets.

Also adds a comment to tell ESLint `EmojiMart` is a global variable.
@samclarke samclarke merged commit 6b154af into samclarke:master Mar 31, 2024
5 checks passed
@samclarke
Copy link
Owner

Thanks for the PR, looks great! 👍

The style tests were failing so I've added a commit to fix that as it's just changing spaces to tabs and adding a few extra spaces. Also adds a comment to tell ESLint that EmojiMart is a global variable.

Really need to change to using Prettier for the formatting so it can all be automated.

@w8tcha
Copy link
Contributor Author

w8tcha commented Apr 1, 2024

Thanks for adding it. I also send a pull request for the website documentation

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants