Does draw.io expose any JS API for manipulating its drawing elements programatically?

2.2k Views Asked by At

I mean I want to use draw.io in my own product which requires drawing. But I need to able to programatically control the elements also. as a simple example based on certain conditions I want to highlight a certain element programatically, like a node in red color.

I went through their wiki in https://github.com/jgraph/drawio/wiki , but I can't find any mention of an API

1

There are 1 best solutions below

0
On BEST ANSWER

Answering my own question, yes, from the github issues , the API reference is this : http://jgraph.github.io/mxgraph/docs/js-api/files/index-txt.html

However note this for the deprecated mxGraph lib, and not the one draw.io is using. so things might have changed in that