-
-
Notifications
You must be signed in to change notification settings - Fork 258
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
Feature request: Mermaid (Markdown) #1091
Comments
It's just a JS library as far as I see, right? |
Yes, and NPM friendly which should integrate nicely (and hopefully seemlessly) for you. |
Should be easy to add that even to 2.9 |
I was thinking it should be a very quick and solid addition for phpmyfaq (and of course the user base) based on the addition of Markdown. Hopefully that proves to be the case. |
Will be added in the upcoming RC2 release. |
Took RC2 for a spin just now - really looks polished and amazing! Congratulations! Just a note / followup on mermaid - it doesn't seem to be incorporated in RC2. Perhaps you meant RC3? Attached is some markdown to test mermaid to try and help. |
Hm, strange. Does it need some configuration? Just added the library |
Here is the relevant doc: http://knsv.github.io/mermaid/#installation Presume you are doing:
|
Further reading seems to indicate best way forward is a call to the API: |
Okay, I forgot that :-( |
Not a problem ... that's why it's an RC!! Will test when available. |
Added these lines, but it still don't work... |
I see your approach was to enable mermaid only if markdown is active. Shall I suggest we start with enabling mermaid at all times (it works with html directly) as a place to start? The following HTML should generate a simple diagram: <div class="mermaid">
graph LR
A-->B
B-->C
C-->A
D-->C
</div> |
Right, shouldn't have any side effects. One thing that seems to break the code is that the arrows are encoded... |
I've seen something similar on one of the downstream projects (arrow / symbol issue). I'll see if I can find it, test & revert. |
Which markdown to HTML renderer are you using? |
Here are the encoding (arrow) references I was remembering: |
OK - here's where I am and I think we should pause...there is an upstream issue. What I've done is relocate the instantiation of mermaid from artikel.php to index.tpl on the bottom as is often used for Doing that minor edit I'm left with this error:
Here are the relevant issues on upstream channels:
Once we see how these are resolved I'll pick it back up. Once we render the graphics correctly I'll see about the direct implementation to the markdown editor. If you are using |
Okay, I'll postpone this feature to 2.9.1. Thanks for testing and investigating! |
btw, we use Parsedown: http://parsedown.org/ |
Okay, so these things are missing:
|
Please see: mermaid-js/mermaid#330 (comment) In order to accurately answer questions the mermaid developer may ask, I think direct interaction between you and him is probably the best road forward. I'll monitor the exchange and offer any help I can. |
Hello :) Is there a public url to the page with the missing arrows? If so I can take a look and see if I see something that could cause the problem. |
Hi, I could install a current snapshot somewhere. |
Sounds like a plan! |
Installation will be up and running the next days, sorry for the delay. |
Sorry for the delay, here's the installation: Username |
Any news on this? |
Ne feedback anymore. :( |
Sorry, on varation. Will look at this when I get back. Get Outlook for iOS On Sun, Aug 7, 2016 at 7:57 PM +0200, "Thorsten Rinne" [email protected] wrote: Ne feedback anymore. :( — |
I have looked at this now. Before we get to mermaid I must say that phpMyFAQ is getting to be an impressive publishing system, simple, elegant and versatile. Well done! Now to the issue at hand. I think the problem is caused by the use of a base tag in phpMyFAQ. This messes up the references to the arrow heads in the generated svg markup. Fortunately there is a configuration option for this in mermaid. If you initialize mermaid with the option arrowMarkerAbsolute set to true it should fix the arrows. Then the references in the arrows heads will be absolute based in the url in the page. This is not always what you want if you for instance want to render the svg outside of the browser but in this case it should be ok.
Try it out and let me know how it goes! |
Thanks a lot, fixed for 2.9.5! |
Mermaid - with the fantastic move to MarkDown, I'd love to see this utility incorporated. I haven't seen mention of it anywhere so I'm adding it here. https://github.com/knsv/mermaid It is SO convenient especially in a FAQ system
The text was updated successfully, but these errors were encountered: