Closed nebc-jasonfung closed 4 months ago
Looks like this can be solved by doing the following:
editor.on('nodeSelected', (id) => {
console.log(editor.getNodeFromId(id).data.name);
});
editor.addNode('foo', 1, 1, 100, 100, 'foo', {name: 'test'}, "<p>Test</p>");
I am using
editor.addNode
function and passing in a JSON object via thedata
attribute. How do I get this data when that node is clicked?