mindoc/static/cherry/drawio_demo/Init.js
张胜 21fe4b631a
markdown编辑器增加cherryMarkdown
* 使用cherryMarkdown替换editorMd

* 支持历史&边栏

* 优化代码&支持html格式渲染为预览格式&保存主题配置

* 修复drawio异常

* 优化drawio异常改法

* 自定义提示面板主题颜色

* drawio增加样式,并且更新到最新版本

* 增加代码块复制功能&&修复drawio渲染图片过大&&drawio生成图片背景改为透明

* 恢复原有markdown编辑器,新增cherry markdown编辑器

* 修复复制功能异常

* 修复drawio偶尔无法编辑

---------

Co-authored-by: zhangsheng.93 <zhangsheng.93@bytedance.com>
2023-07-03 09:41:27 +08:00

28 lines
1.2 KiB
JavaScript

// urlParams is null when used for embedding
window.urlParams = window.urlParams || {};
// Public global variables
window.DOM_PURIFY_CONFIG = window.DOM_PURIFY_CONFIG ||
{ADD_TAGS: ['use'], FORBID_TAGS: ['form'],
ALLOWED_URI_REGEXP: /^((?!javascript:).)*$/i,
ADD_ATTR: ['target', 'content']};
// Public global variables
window.MAX_REQUEST_SIZE = window.MAX_REQUEST_SIZE || 10485760;
window.MAX_AREA = window.MAX_AREA || 15000 * 15000;
// URLs for save and export
window.EXPORT_URL = window.EXPORT_URL || './drawio_demo';
window.SAVE_URL = window.SAVE_URL || './drawio_demo';
window.PROXY_URL = window.PROXY_URL || null;
window.OPEN_URL = window.OPEN_URL || './drawio_demo';
window.RESOURCES_PATH = window.RESOURCES_PATH || './drawio_demo/resources';
window.STENCIL_PATH = window.STENCIL_PATH || './drawio_demo/image/stencils';
window.IMAGE_PATH = window.IMAGE_PATH || './drawio_demo/image';
window.STYLE_PATH = window.STYLE_PATH || './drawio_demo/src/css';
window.CSS_PATH = window.CSS_PATH || './drawio_demo/src/css';
window.OPEN_FORM = window.OPEN_FORM || './drawio_demo';
window.mxBasePath = window.mxBasePath || './drawio_demo/src';
window.mxLanguage = window.mxLanguage || window.RESOURCES_PATH + '/zh';
window.mxLanguages = window.mxLanguages || ['zh'];