diff --git a/src/editor.ts b/src/editor.ts index 93a53d3..4d81f32 100644 --- a/src/editor.ts +++ b/src/editor.ts @@ -39,10 +39,35 @@ import { IFrame } from '@jupyterlab/apputils'; const DRAWIO_URL = URLExt.join( PageConfig.getBaseUrl(), "static/lab", - "node_modules/jupyterlab-drawio/src/drawio/src/main/webapp", - "index.html?embed=1&proto=json&spin=1&noExitBtn=1&configure=1" + "node_modules/jupyterlab-drawio/src/drawio/src/main/webapp/index.html" ); + +/** + * Core URL params that are required to function properly + */ +const CORE_EMBED_PARAMS = { + embed: 1, + proto: 'json', + configure: 1 +}; + +/** + * Default embed params, mostly to turn off third-party javascript + */ +const DEFAULT_EMBED_PARAMS = { + gapi: 0, // google + od: 0, // onedrive + trello: 0, // trello + noExitBtn: 1, +} + +const DEFAULT_CONFIG = { + compressXml: false, + override: true, + version: (+(new Date())).toString() +} + export class DrawioWidget extends DocumentWidget