Updated flowcharts with the new syntax

This commit is contained in:
Knut Sveidqvist
2022-04-30 11:36:00 +02:00
parent bada661bd0
commit 85e157f0d3
5 changed files with 1137 additions and 39 deletions

34
src/commonDb.js Normal file
View File

@@ -0,0 +1,34 @@
import { sanitizeText as _sanitizeText } from './diagrams/common/common';
import { getConfig } from './config';
let title = '';
let description = '';
const sanitizeText = (txt) => _sanitizeText(txt, getConfig());
export const clear = function () {
title = '';
description = '';
};
export const setTitle = function (txt) {
title = sanitizeText(txt).replace(/^\s+/g, '');
};
export const getTitle = function () {
return title;
};
export const setAccDescription = function (txt) {
description = sanitizeText(txt).replace(/\n\s+/g, '\n');
};
export const getAccDescription = function () {
return description;
};
export default {
setTitle,
getTitle,
getAccDescription,
setAccDescription,
clear,
};