Skip to content

API Overview

y-mxgraph exports the following:

NameTypeDescription
BindingclassBidirectional binding between a draw.io file and a Y.Doc
BindDrawioFileOptionstypeOptions type for the Binding constructor
xml2ydocfunctionConvert draw.io XML → Y.Doc
ydoc2xmlfunctionConvert Y.Doc → draw.io XML
LOCAL_ORIGINobjectOrigin marker for local transactions
DEFAULT_USER_NAME_KEYstringDefault awareness field for the user's display name
DEFAULT_USER_COLOR_KEYstringDefault awareness field for the user's color
ts
import {
  Binding,
  xml2ydoc,
  ydoc2xml,
  LOCAL_ORIGIN,
  DEFAULT_USER_NAME_KEY,
  DEFAULT_USER_COLOR_KEY,
} from 'y-mxgraph';
import type { BindDrawioFileOptions } from 'y-mxgraph';

Released under the MIT License.