JSON Schema#

The settings schema drives the JupyterLab Advanced Settings user interface, and is the source-of-truth for a number of parts of IPyDrawio.

Diagram Documents#

Configure Diagram Settings

type

object

properties

  • disableEscapeFocus

disable returning focus to the main frame when the escape key is pressed

default

False

  • drawioConfig

Configuration options sent to each drawio editor. https://www.diagrams.net/doc/faq/configure-diagram-editor

default

compressXml

False

override

True

showStartScreen

False

Drawio Configuration

  • drawioExportUrl

URL parameters for the export URL.

Drawio Export URL

  • drawioUrlParams

URL parameters for the drawio iframe https://web.archive.org/web/20210425055302/https://www.diagrams.net/doc/faq/supported-url-parameters

default

db

0

drafts

0

gapi

0

gh

0

gl

0

od

0

p

ex;tips;svgdata;sql;anim;trees;replay;anon;flow;webcola;tags

picker

0

stealth

1

svg-warning

0

thumb

0

tr

0

ui

min

Drawio URL Params

color#

type

string

color-scheme#

properties

  • fill

color

  • font

type

string

  • gradient

color

  • stroke

color

color-set#

type

array

items

color

uniqueItems

True

Drawio Configuration#

type

object

properties

  • autosaveDelay

Defines the delay (in ms) between the last change and the autosave of the file

type

number

  • compressXml

Specifies if the XML output should be compressed.

type

boolean

  • css

Defines a string with CSS rules to be used to configure the diagrams.net user interface.

type

string

  • customColorSchemes

TBD: see https://www.diagrams.net/doc/faq/configure-diagram-editor

  • customFonts

An array of font family names to be added before defaultFonts

font-set

  • customPresetColors

Colour codes to be added before presetColors (no leading # for the colour codes)

color-set

  • dataGovernance

Set the server endpoint region. The default is to use your closest region, (either EU or US). If lockdown is set to true, dataGovernance is ignored.

type

string

  • defaultColorSchemes

TBD: see https://www.diagrams.net/doc/faq/configure-diagram-editor

color-scheme

  • defaultColors

Colour codes for the lower palette in the colour dialog (no leading # for the colour codes).

color-set

  • defaultCustomLibraries

Defines an array of IDs to load custom libraries.

library-id-list

  • defaultEdgeLength

Defines the default length for new connectors

type

number

  • defaultEdgeStyle

TBD: see https://www.diagrams.net/doc/faq/configure-diagram-editor

  • defaultFonts

An array of font family names in the format panel font drop-down list. All fonts must be installed on the server and all clients or be added using the fontCss option.

font-set

  • defaultLibraries

Defines a semicolon-separated list of library keys (unique names) in a string to be initially displayed in the left panel (e.g. general;uml;company-graphics). Possible keys include custom entry IDs from the libraries field, or keys for the libs URL parameter

default

general;uml;er;bpmn;flowchart;basic;arrows2

library-keys-string

  • defaultVertexStyle

TBD: see https://www.diagrams.net/doc/faq/configure-diagram-editor

  • emptyDiagramXml

Defines the XML for blank diagrams

type

string

  • emptyLibraryXml

Defines the XML for blank diagrams and libraries

type

string

  • enableCustomLibraries

Specifies if the open and new library functions are enabled (true or false, the default true).

type

boolean

  • enabledLibraries

Defines an array of strings of library keys which will be available in the More Shapes dialog. If you define this as null, all libraries will be visible. If you leave the array empty, no libraries will be visible

library-key-list

  • fontCss

Defines a string with CSS rules for web fonts to be used in diagrams. This should be one or more @font-face rule,

type

string

  • globalVars

JSON structure with key, value pairs to define global variables for system-wide placeholders. You should keep the number of entries small.

type

object

  • gridSteps

Defines the number of minor grid steps (14.3.2 and later).

type

number

  • libraries

Defines an array of objects that list additional libraries and sections in the left panel and the More Shapes dialog

library-def-list

  • lockdown

Disable data transmission, apart from directly between your browser and your selected data storage location. Default is false.

type

boolean

default

False

  • maxImageBytes

Defines the maximum size for images in bytes. Default is 1000000.

type

number

default

1000000

  • maxImageSize

Defines the maximum width or height of the image, where the lowest value is used.

type

number

default

520

  • override

Ignores the current settings on the client-side if this is set to true

type

boolean

  • plugins

Defines an array of plugin URLs that should be loaded with the diagram editor. Plugins are JavaScript files that can modify the editor UI and behaviour.

plugin-url-list

  • presetColors

Colour codes for the upper palette in the colour dialog (no leading # for the colour codes).

color-set

  • simpleLabels

Disables word wrap and complex formatting for labels by default to avoid foreignObjects in the SVG output (14.5.9 and later).

type

boolean

default

True

  • styles

type

array

items

style

  • templateFile

Defines the URL of the source file for the Templates dialog (multiple <template> tags are allowed).

type

string

format

uri

  • thumbHeight

Defines the height for the entries in the left panel

type

number

  • thumbWidth

Defines the width for the entries in the left panel

type

number

  • version

The current version of the configuration (any string, e.g. 1.0). If this is different from the last used version, then the current settings on the client-side (.drawio-config) will be reset. The default is null. Change this to force the stored settings in the client to be reset and apply the current configuration

type

string

  • zoomFactor

Defines the zoom factor for mouse wheel and trackpad zoom. Default is 1.2. (14.7.0 and later).

type

number

default

1.2

Drawio Export URL#

export URL params jgraph/draw-image-export2

properties

  • params

type

object

properties

  • allPages

Whether all pages should be rendered 0 0 1

type

string

  • base64

Whether the response data should be base64 (and png embedded data) encoded 0 or 1

type

string

  • bg

The background colour for the image #ff8888

type

string

  • border

The size of the border for the page 0 10

type

number

  • data

The data to embed into the png -

type

string

  • dataHeader

The key to use when embedding the data into the png myKey

type

string

  • embedData

Embed data in the png with the dataHeader key null 0 or 1

type

string

  • embedXml

Embed the diagram data in the png 0 or 1

type

string

  • extras

Additional detail how what should be rendered, e.g. layer-names

  • filename

The filename to included in the content-disposition header myFile.png

type

string

  • format

The renderering format for the diagram png pdf

type

string

  • from

The index of the page to start rendering from 1

type

number

  • h

Set the view port width 0 10

type

number

  • pageId

The id of the page to render page id

type

string

  • scale

The scale for the rendered diagram 1 1.5

type

number

  • to

The index of the page to finish rendering at 2

type

number

  • w

Set the view port height 0 10

type

number

  • url

URL for (local) drawio-export server jgraph/draw-image-export2

type

string

default

./drawio/export/

Drawio URL Params#

type

object

properties

  • base

url: Sets the base URL to use for links (use this if document.referrer is not available in embed mode).

type

string

format

uri

  • border

60: Sets the border width used in lightbox mode (the default is 60).

type

number

  • browser

0/1: Disables local storage as a storage location (0) or shows the browser option in the storage dialog (1).

on-off-switch

  • chrome

0: Uses the chromeless read-only viewer.

off-switch

  • clibs

key1;key2;key;…;keyN: Specifies custom libraries (keys are file IDs or URLs with a U-prefix)

library-keys-string

  • client

1: Runs diagrams.net in client mode. This displays a normal UI and sends a ready message to the opener or parent when the page is loaded. After receiving a message containing XML or compressed XML, a local file is created. The file is then set to modified so the connection to the window can be closed after sending the initial XML. Whether the XML is loaded again after a page refresh, depends on the caller implementation. Use proto=json to use a custom protocol for special cases.

on-switch

  • close

1: Shows the Close button in chromeless mode which closes the window when selected.

on-switch

  • configure

1: Sends the configure event and waits for the configure action. See more about the embed mode. NEW `14.6.10`

off-switch

  • cors

regex: Checks whether URLS have CORS enabled using a URL encoded regular expression, e.g.cors=%5Ehttps%3F%3A%5C%2F%5C%2F.*%5C.github%5C.io%5C%2F TBD `14.6.10`

type

string

format

regex

  • create

url/name: Creates a new file from a template URL. If the value is not a URL and is not empty, the script will try to use window.opener_url. In embed mode, window.opener[name] will be used to get the initial XML. Note that this requires the same origin policy in the opener/parent for reading the variable.

type

string

  • dark

[0|1]: Disables/enables dark mode in Sketch and Minimal editor themes.

on-off-switch

  • data

data: Gets the XML data for the diagram (used in client mode to bypass message passing and cross frame access). TBD `14.6.10`

type

string

  • db

0: Disables the Dropbox integration.

off-switch

  • demo

1: Shortcut for db=0&gapi=0&math=0&picker=0, disables the splash screen and creates an empty, local diagram file.

on-switch

  • desc

{compressed-json}: Passes the CSV import descriptor example. Works with the www.draw.io domain only. NEW `14.6.10`

  • drafts

0: Disables draft states (does not save unsaved files in IndexedDB).

off-switch

  • drive

0: Simulates app.diagrams.net regardless of the domain name (uses the old app ID).

off-switch

  • edge

move: Disables the handling of connector segments without having previously selected the connector.

type

string

  • edit

edit=url: Adds a link for the Edit button in chromeless mode (use edit=_blank to edit the diagram as a new copy).

url-param-url-or-blank

  • embed

embed=1: Runs diagrams.net in embed mode. Use this mode with embed.diagrams.net only. NEW `14.6.10`

  • format

0: Disables the format panel on the right.

off-switch

  • gapi

0: Disables the Google integration.

off-switch

  • gh

0: Disables the Github integration.

off-switch

  • gitlab

url: Sets the URL-encoded path to a custom GitLab installation to use for GitLab file operations.

type

string

format

uri

  • gitlab-id

ID: Specifies the client ID of the custom GitLab application when using a custom GitLab instance.

type

string

  • gl

0: Disables the GitLab integration.

off-switch

  • grid

1: Uses the chromeles mode with the grid enabled.

on-switch

  • hide-pages

1: Hides the controls that allow you to change the current page in lightbox mode. NEW `14.6.10`

on-off-switch

  • highlight

hex: Specifies the highlight colour (with no leading #) for links in chromeless mode.

color

  • keepmodified

1: If modified specifies a resource key, this is used to keep the modified state after Save is selected. TBD `14.6.10`

on-switch

  • lang

xy: Specifies the language of the user interface. Possible values for xy include i18n ar, bs, ca, cs, da, de, el, en, es, et, fi, fil, fr, he, hu, id, it, ja, ko, ms, nl, no, pl, pt, pt-br, ro, ru, sr, sv, th, tr, uk, vi, zh, zh-tw

type

string

examples

ar

bs

ca

cs

da

de

el

en

es

et

fi

fil

fr

he

hu

id

it

ja

ko

ms

nl

no

pl

pt

pt-br

ro

ru

sr

sv

th

tr

uk

vi

zh

zh-tw

  • layers

1: Adds layer control in chromeless mode

on-switch

  • libraries

1: Specifies whether libraries should be enabled in embed mode. The default is disabled (0). TBD `14.6.10`

on-switch

  • libs

key1;key2;…;keyN: Specifies the current libraries. Possible keys are allied_telesis, android, archimate, archimate3, arrows2, atlassian, aws3, aws3d, aws4, azure, basic, bootstrap, bpmn, cabinets, cisco, cisco_safe, citrix, clipart, dfd, eip, electrical, er, floorplan, flowchart, gcp2, general, gmdl, ibm, images, infographic, ios, lean_mapping, mockups, mscae, network, office, pid, rack, signs, sitemap, sysml, uml, veeam and webicons.

library-keys-string

  • lightbox

1: Uses the lightbox in chromeless mode (larger zoom, no page visible, chromeless).

on-switch

  • local

1: Uses device mode only.

on-switch

  • math

0: Disables MathJax support.

on-switch

  • math-font

: Sets the font to use for math typesetting. Possible values are STIX-Web and TeX (default). TBD `14.6.10`

type

string

  • math-output

html: Sets the math typesetting output to HTML-CSS. NEW `14.6.10`

examples

html

  • mode

[google|onedrive|github|dropobox|device|browser]: Switches to the specified mode.

url-param-mode

  • nav

1: Enables folding in chromeless mode.

on-switch

  • noExitBtn

1: Displays no Exit button. Instead of using this URL parameter, you can specify this setting in the load message. TBD `14.6.10`

on-switch

  • noSaveBtn

1: Displays a Save and Exit button instead of a Save button. Instead of using this URL parameter, you can specify this setting in the load message. If this is used, then saveAndExit is ignored. TBD `14.6.10`

on-switch

  • notitle

1: Uses the default filename for new files (used with the url parameter)

on-switch

  • nowarn

1: Suppresses the warning before an unload for local files.

on-switch

  • od

0: Disables the OneDrive integration.

off-switch

  • offline

[1|0]: Registers or unregisters the progressive web app (all remote storage locations are disabled).

on-off-switch

  • open

prefix+ID: If location hash properties are not available, use this as a replacement. The browser will add the hash property to the URL immediately and not remove the URL parameter. Existing hash property takes precedence.

type

string

  • override-mime

1: Saves all Google Drive files as application/vnd.jgraph.mxfile.

on-switch

  • p

id1;id2;…;idN: Selects which plugins to load. See the list of available plugins.

library-keys-string

  • page

index: Starts with the given page (the default is the first page, where the index for the first page is 0)

type

number

  • page-id

ID: Starts with the given page ID (has precedence over the page URL parameter). To find the ID of the current page, right click on the canvas and select Edit Data. The ID is the first entry in this dialog.

type

string

  • picker

0/1: Disables/enables the Google file picker in dialogs.

on-off-switch

  • plugins

0: Does not load plugins.

off-switch

  • proto

client=1: Runs diagrams.net in client mode. This displays a normal UI and sends a ready message to the opener or parent when the page is loaded. After receiving a message containing XML or compressed XML, a local file is created. The file is then set to modified so the connection to the window can be closed after sending the initial XML. Whether the XML is loaded again after a page refresh, depends on the caller implementation. Use proto=json to use a custom protocol for special cases. NEW `14.6.10`

  • pv

0: Sets the default pageVisible to false.

off-switch

  • pwa

0: Disables the ability to (un)register the progressive web app (when installed it will stay installed). NEW `14.6.10`

off-switch

  • returnbounds

1: Returns a JSON structure with the diagram bounds in embed and client mode. This message is dispatched immediately after receiving the diagram XML. TBD `14.6.10`

off-switch

  • rev

id: Selects a specific revision of a Google Drive or Dropbox file.

type

string

  • rough

[0|1]: Disables/enables the rough sketch style (default is 1 for sketch theme and 0 for all other themes).

on-off-switch

  • rt

1: Uses chromeless mode with Google Drive realtime enabled.

on-switch

  • ruler

1: Starts with the ruler enabled.

on-switch

  • save

local/remote: Enables/disables saving files locally (default is local). If this is disabled, then files are echoed via a servlet for a local save.

url-param-save

  • saveAndExit

1: Displays a Save and Exit button ne. Instead of using this URL parameter, you can specify this setting in the load message. TBD `14.6.10`

on-switch

  • sb

0: Starts with scrollbars disabled.

off-switch

  • search-shapes

value: Starts with given value in the search shapes box. ## Modes NEW `14.6.10`

type

string

  • spin

1: Shows a Loading… spinner while waiting for the diagram data to load in embed mode. TBD `14.6.10`

on-switch

  • splash

0: Does not show the splash screen.

off-switch

  • stealth

1: Disables all features that require external web services (such as PDF export).

on-switch

  • storage

device: Adds a device storage option for touch devices.

url-param-storage

  • svg-warning

0: Suppresses the warning for old viewers in SVG export. NEW `14.6.10`

off-switch

  • sync

[none|manual|auto]: Enables/disables collaborative editing (default is auto).

url-param-sync

  • target

[auto|self|frame|blank]: Opens links in the same window or frame or in a blank window in chromeless mode (auto is the default which opens relative links and anchors in the same window in chromeless mode, and all links in a new window in editing mode).

url-param-target

  • template-filename

name: If the #U hash property is used but the URL does not contain a filename to determine binary mode. See the list of supported location hash properties.

type

string

  • thumb

0: Disables the creation of thumbnails in Drive.

off-switch

  • title

title: Sets a new file title (used with the create and url parameters).

type

string

  • toolbar

0: Disables the toolbar in chromeless mode.

off-switch

  • tr

0: Disables the Trello integration.

off-switch

  • ui

[min|atlas|dark|sketch]: Uses the Minimal, Atlas, Dark or Sketch UI theme (default is Kennedy).

examples

min

atlas

dark

sketch

UI Theme

  • url

url: Deprecated - Use U hash property #U{uri_encoded_url} to open a diagram from a URI-encoded URL, eg. https://app.diagrams.net/#Uhttps%3A%2F%2Fraw.githubusercontent.com%2Fjgraph%2Fdrawio-diagrams%2Fmaster%2Fdiagrams%2Fschema.xml NEW `14.6.10`

  • vars

vars=json: Uses a URI-encoded JSON string for global placeholders for use in labels and tooltips where enabled, e.g. vars={“key”:”value”}.

type

string

  • viewbox

{“x”: int, “y”: int, “width”: int, “height”: int}: Sets the initial viewport when you specify file IDs. NEW `14.6.10`

  • zoom

nocss: Disables the CSS zoom preview.

type

string

font-set#

type

array

items

oneOf

type

string

type

object

properties

  • fontFamily

type

string

  • fontUrl

type

string

format

uri

Drawio Library#

type

object

properties

  • data

type

object

properties

  • aspect

type

string

  • h

type

number

  • w

type

number

  • xml

NB: appears to be base64-encoded

type

string

  • tags

type

string

  • title

library-resource

  • url

type

string

format

uri

library-def-list#

type

array

items

library-section

library-entry#

type

object

properties

  • desc

library-resource

  • id

type

string

  • libs

type

array

items

Drawio Library

  • preview

type

string

  • title

library-resource

library-id-list#

type

array

items

type

string

library-key-list#

type

array

items

type

string

library-keys-string#

type

string

library-resource#

type

object

properties

  • main

type

string

library-section#

type

object

properties

  • entries

type

array

items

library-entry

  • title

library-resource

off-switch#

type

string

anyOf

on

const

off

const

0

on-off-switch#

type

string

anyOf

off

const

0

on

const

on-switch#

type

string

anyOf

on

const

1

off

const

plugin-url-list#

type

array

items

type

string

format

uri

style#

properties

  • commonStyle

type

object

  • edgeStyle

type

object

  • graph

type

object

UI Theme#

type

string

enum

min, atlas, dark, kennedy, sketch

url-param-mode#

type

string

enum

google, onedrive, github, dropobox, device, browser

url-param-save#

type

string

enum

local, remote

url-param-storage#

type

string

enum

device

url-param-sync#

type

string

enum

none, manual, auto

url-param-target#

type

string

enum

auto, self, frame, blank

url-param-url-or-blank#

anyOf

type

string

format

uri

type

string

enum

_blank