Mermaid: Is there a way to use emoji?

Created on 15 Feb 2018  ยท  13Comments  ยท  Source: mermaid-js/mermaid

Hi there,

I have a flow chart, that is a chatbot conversation, and we have some emojis in our texts.
Is there a way to incorporate it?

Many thanks.

Development Flow Approved Enhancement

Most helpful comment

Just stumbled across this solution after addressing when an end-user puts in breaking characters like: ( or {
See: http://mermaid-js.github.io/mermaid/#/flowchart?id=special-characters-that-break-syntax.

Basically just wrap in double quotes and then you can paste in emojis

graph TD
A-->B("hello ๐Ÿฅฐ")

Screen Shot 2019-11-25 at 11 51 19 AM

All 13 comments

Currently nope, I am afraid.

@tylerlong That's where you're wrong ๐Ÿ˜ฎ

@edudesouza escape it and you can:

graph TD
A---foo[&amp#x1F619]

emoticon graphed

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

Heyo! This is still very important. :D

Of course, emoji support will give this package much powerful visualization

We do support fontawesome ut emojis are emojis... ๐ŸŒ 

Any opposition to including emoji in the unicode text range? Basing this off of this GH issue and looking at the code for parsing UNICODE_TEXT tokens.

Started playing around with the idea here: https://github.com/RangerMauve/mermaid/tree/emoji

@RangerMauve Join us in slack if you need some help/feedback/answers and be sure to read the contribution guide!

Just stumbled across this solution after addressing when an end-user puts in breaking characters like: ( or {
See: http://mermaid-js.github.io/mermaid/#/flowchart?id=special-characters-that-break-syntax.

Basically just wrap in double quotes and then you can paste in emojis

graph TD
A-->B("hello ๐Ÿฅฐ")

Screen Shot 2019-11-25 at 11 51 19 AM

Just stumbled across this solution after addressing when an end-user puts in breaking characters like: ( or {
See: http://mermaid-js.github.io/mermaid/#/flowchart?id=special-characters-that-break-syntax.

Basically just wrap in double quotes and then you can paste in emojis

graph TD
A-->B("hello ๐Ÿฅฐ")

Screen Shot 2019-11-25 at 11 51 19 AM

Thanks! The same goes for Unicode characters like โ— โ†’ etc. Found it useful when I was building LR(0) items:

graph LR
I00("S' โ†’ โ— S<br>S โ†’ โ— L = R<br>S โ†’ โ— R<br>L โ†’ โ— * R<br>L โ†’ โ— id<br>R โ†’ โ— L")
I01("S' โ†’ S โ—")
I02("S โ†’ L โ— = R")
I03("S โ†’ R โ—")
I04("L โ†’ * โ— R<br>R โ†’ โ— L")
I05("L โ†’ id โ—")
I06("R โ†’ L โ—")

I00 -- S --> I01
I00 -- L --> I02
I00 -- R --> I03
I00 -- * --> I04
I00 -- id --> I05
I00 -- L --> I06

I07("S โ†’ L = โ— R<br>R โ†’ โ— L")
I08("L โ†’ * R โ—")

I09("S โ†’ L = R โ—")

I02 -- L --> I07
I04 -- R --> I08
I04 -- L --> I06

I07 -- L --> I06
I07 -- R --> I09

image

Just wondering... can I align the multiple lines to left instead of centre which appears to be default, and give external labels to (each) boxes?

[an aside] @joe733 you coming from Tikz? - Would be handy to get your notes there! :)

[an aside] @joe733 you coming from Tikz? - Would be handy to get your notes there! :)

[off-topic] @SamuelMarks, I've not used Tikz. As for the notes... it's an assignment by my compiler design teacher, thought it would be fun to give it a try with .md & mermaid :smile: and oh about the PDF I'm generating it using Joplin.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

michaeltlombardi picture michaeltlombardi  ยท  3Comments

gvlx picture gvlx  ยท  5Comments

pirDOL picture pirDOL  ยท  3Comments

init-dcat-ap-de picture init-dcat-ap-de  ยท  3Comments

visualcurrent picture visualcurrent  ยท  3Comments