1
0
mirror of https://github.com/laurent22/joplin.git synced 2025-12-02 22:49:09 +02:00

All: Resolves #163: Added Mermaid support to desktop and mobile

This commit is contained in:
Laurent Cozic
2019-02-28 00:21:40 +00:00
parent e841ea8a91
commit a0e5947ba4
8 changed files with 39 additions and 384 deletions

View File

@@ -1,5 +1,4 @@
const { shim } = require('lib/shim');
const mermaid = require('mermaid');
const injectedJs = require('lib/rnInjectedJs/mermaid');
class MdToHtml_Mermaid {
@@ -14,7 +13,10 @@ class MdToHtml_Mermaid {
}
extraCss() {
return '';
// Force a white background because the graphs can have various colours
// that may not be compatible with the current theme. Also make it
// inline-block so that the div is the same size as the content.
return '.mermaid { background-color: white; display:inline-block; }';
}
injectedJavaScript() {