New config attribute, htmlLabels
This commit is contained in:
parent
9c8e36ea95
commit
3fe38237e6
|
@ -94,6 +94,7 @@ var equals = function (val, variable){
|
||||||
|
|
||||||
global.mermaid = {
|
global.mermaid = {
|
||||||
startOnLoad:true,
|
startOnLoad:true,
|
||||||
|
htmlLabels:true,
|
||||||
init:function(){
|
init:function(){
|
||||||
init();
|
init();
|
||||||
},
|
},
|
||||||
|
@ -109,6 +110,12 @@ exports.contentLoaded = function(){
|
||||||
// Check state of start config mermaid namespece
|
// Check state of start config mermaid namespece
|
||||||
//console.log('global.mermaid.startOnLoad',global.mermaid.startOnLoad);
|
//console.log('global.mermaid.startOnLoad',global.mermaid.startOnLoad);
|
||||||
//console.log('mermaid_config',mermaid_config);
|
//console.log('mermaid_config',mermaid_config);
|
||||||
|
if (typeof mermaid_config !== 'undefined') {
|
||||||
|
if (equals(false, mermaid_config.htmlLabels)) {
|
||||||
|
global.mermaid.htmlLabels = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if(global.mermaid.startOnLoad) {
|
if(global.mermaid.startOnLoad) {
|
||||||
|
|
||||||
// For backwards compatability reasons also check mermaid_config variable
|
// For backwards compatability reasons also check mermaid_config variable
|
||||||
|
@ -128,7 +135,7 @@ exports.contentLoaded = function(){
|
||||||
|
|
||||||
if(typeof document !== 'undefined'){
|
if(typeof document !== 'undefined'){
|
||||||
/**
|
/**
|
||||||
* Wait for coument loaded before starting the execution
|
* Wait for document loaded before starting the execution
|
||||||
*/
|
*/
|
||||||
document.addEventListener('DOMContentLoaded', function(){
|
document.addEventListener('DOMContentLoaded', function(){
|
||||||
exports.contentLoaded();
|
exports.contentLoaded();
|
||||||
|
|
Loading…
Reference in New Issue