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

How to add my custom imag emojis #2

Closed
ape660 opened this issue Nov 20, 2022 · 7 comments
Closed

How to add my custom imag emojis #2

ape660 opened this issue Nov 20, 2022 · 7 comments

Comments

@ape660
Copy link

ape660 commented Nov 20, 2022

No description provided.

@candideu
Copy link
Contributor

The API used has this in their docs: https://picmojs.com/docs/usage/custom/

Not sure how to make this work on this app, though...

@walsvid
Copy link
Owner

walsvid commented Mar 23, 2023

image

In fact I have added custom emoji in the last panel. However, it is currently not implemented for users to add custom emoji locally. Contributions are welcome!

Another issue is that custom emoji can only be inserted in the form of pictures in logseq, and the current UI has some bugs in handling the mixed arrangement of text and pictures, and in some cases the desired effect cannot be obtained. Please see logseq/logseq#6070 for details.

@candideu
Copy link
Contributor

@walsvid Makes sense, thanks for pointing out the custom emoji you've already added and the current bugs.

I not at all familiar with Logseq plugin development, but my hunch would be to make the custom emojis configurable in the plugin settings (via logseq.App.getUserConfigs or something).

So lines 19-48 in index.ts could be modifiable in the plugin settings JSON, and users would just have to add as many entries as they want for their custom emojis.

image

logseq-plugin-wrap does this to allow users to modify and add more options to the toolbar.

@walsvid
Copy link
Owner

walsvid commented Mar 25, 2023

Hi all, I have update the plugin to v0.0.3. The new version supports adding custom emojis via json config file. After updating the configuration, please restart logseq or toggle the plugin to make the custom emoji settings take effect.

Feel free to reopen the issue again.

@walsvid walsvid closed this as completed Mar 25, 2023
@candideu
Copy link
Contributor

Amazing, thank you @walsvid ! I've filmed a demo, and I'll make a PR to add to the README.

@candideu
Copy link
Contributor

@walsvid Another limitation I've noticed is that custom emojis which are saved in the assets folder aren't previewed, although they appear when you add them to the page.

image

@walsvid walsvid reopened this Mar 26, 2023
@walsvid
Copy link
Owner

walsvid commented Mar 26, 2023

Hi, @candideu. The picmo library used by this plugin manages and renders custom emoji/image by url, so there will be rendering problems when using local files. My suggestion is to use an image hosting service to convert local images to accessible urls.

@walsvid walsvid closed this as completed Mar 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants