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

Adding mermaid to Joplin #163

Closed
sradevski opened this issue Jan 13, 2018 · 17 comments
Closed

Adding mermaid to Joplin #163

sradevski opened this issue Jan 13, 2018 · 17 comments
Assignees
Labels
enhancement Feature requests and code enhancements

Comments

@sradevski
Copy link

sradevski commented Jan 13, 2018

Hi there, I just installed Joplin and it is amazing, great job! I see you are trying to keep the dependencies as low as possible, but I was wondering if you would be interested in adding Mermaid support to it? If you are not familiar with it, it is a markdown extension that supports generating flowcharts, sequence diagrams, and I see few more diagrams in development now.

I am not sure if I will have the time to do a PR, so I just wanted to see if there is any interest about it. Cheers!

@ghost
Copy link

ghost commented Jan 13, 2018

  • 1

@laurent22
Copy link
Owner

Assuming the Mermaid plugin works it might be possible - https://github.com/tylingsoft/markdown-it-mermaid

@laurent22 laurent22 added the enhancement Feature requests and code enhancements label Jan 15, 2018
@thche
Copy link

thche commented Jan 23, 2019

anyway to support this ehancement?

@zohozer
Copy link

zohozer commented Feb 27, 2019

Seems that this feature it is added to the recent build, but no example how to use-it.

I created a new note like this:

============

dateFormat YYYY-MM-DD
title Adding GANTT diagram functionality to mermaid
section A section
Completed task :done, des1, 2014-01-06,2014-01-08
Active task :active, des2, 2014-01-09, 3d
Future task : des3, after des2, 5d
Future task2 : des4, after des3, 5d
section Critical tasks
Completed task in the critical line :crit, done, 2014-01-06,24h
Implement parser and jison :crit, done, after des1, 2d
Create tests for parser :crit, active, 3d
Future task in critical line :crit, 5d
Create tests for renderer :2d
Add to mermaid :1d

===============

But when pressing the preview button, no nice graphics displayed.

I used the example from here: https://mermaidjs.github.io

@laurent22
Copy link
Owner

You'd need to wrap it in a codeblock with "mermaid" at the start:

capture d ecran 2019-02-27 a 09 13 12

But note that it's still an experimental feature and not yet supported in mobile, so that's why it's not documented.

@laurent22
Copy link
Owner

This will be officially supported from the next version of Joplin on both mobile and desktop. The doc is already there: https://github.com/laurent22/joplin#charts

@laurent22
Copy link
Owner

Sorry but for now I will disable Mermaid support as I need to evaluate whether it makes sense to actually support it. As I'm using it I see all kind of issues so it's possible that instead of Mermaid, other diagram libs will be used.

@laurent22 laurent22 reopened this Mar 6, 2019
@stefan2904
Copy link

Since it was last mentioned in the changelog of v1.0.135, is this feature still present in v1.0.140?

@MAnECiaC
Copy link

Mermaid isn't working in Version 1.0.140 anymore. Are there any infos when it will be back?

@tessus
Copy link
Collaborator

tessus commented May 5, 2019

I hope I can add it back within the next 2 weeks. Although the PR might me WIP at first, because it's likely I need some help with this. But at least I can get the ball rolling. Using mermaid properly is a bit of a PAIN, because react-native does not allow to run external js, which means it has to be injected.

/ref Discourse: Mermaid stopped working in lastest version 1.0.140

@d-ariza
Copy link

d-ariza commented Jul 18, 2019

I first want to say hello and thank you for the work of this wonderful project that I benefit. I use this project on my mobile device, and in my home and work computers, and really recommend it to my friends or partners. Yesterday I was documenting a project and I had to make some diagrams. I know that some versions of markdown support it.but my surprise was to know that so does Joplin.
I really tried to make them as I saw them in some threads, I even built it with react, but I can not get it to work. I use Joplin 1.0.161 in ubuntu linux, in arch, in artix ( a arch without systemD), in mxlinux18; i Use the black theme, but i try in the light theme... but the "mermaid" feature do not work for me. I would greatly appreciate to tell me how I can activate or implement the feature to build it. and I apologize again for bothering you with the subject., and again I apologize for bothering with it. Thanks. I attached some pictures...
2019-07-18-090120_1438x505_scrot
2019-07-18-090125_1615x1026_scrot
2019-07-18-090144_1464x401_scrot
2019-07-18-090149_1615x1026_scrot

@tessus
Copy link
Collaborator

tessus commented Jul 18, 2019

@d-ariza

but the "mermaid" feature do not work for me.

Of course not. Mermaid support haasn't been added back yet.

@d-ariza
Copy link

d-ariza commented Jul 18, 2019

@tessus , thank you for your quick response. I want to ask, Can I added this feature somehow, Can I help us with this or some similar feature ???

@tessus
Copy link
Collaborator

tessus commented Jul 18, 2019

Sure, do you know how to code react native and electron applications? The problem is that we can't load 3rd party js. This is why it has to be injected.

I wanted to work on it for a while now, but there's always something else popping up.

@d-ariza
Copy link

d-ariza commented Jul 18, 2019

ok I try inject the code in the react native... I ask if something, I will start looking for a code injection in electron and from there I'm moving forward ... thanks

@tessus
Copy link
Collaborator

tessus commented Jul 19, 2019

@d-ariza you will also have to create a file in the rules directory of MdToHtml to actually integrate the mermaid code. don't use the markdown-it-mermaid module. It is dated and shouldn't be used for Joplin.

@laurent22 laurent22 self-assigned this Oct 10, 2019
@tessus
Copy link
Collaborator

tessus commented Oct 17, 2019

see #2001 for tracking progress

@tessus tessus closed this as completed Oct 17, 2019
@lock lock bot locked and limited conversation to collaborators Oct 18, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement Feature requests and code enhancements
Projects
None yet
Development

No branches or pull requests

8 participants