retejs / rete

JavaScript framework for visual programming
https://retejs.org
MIT License
9.86k stars 647 forks source link

Dynamically adding node on blur of input field #268

Closed akshayred closed 5 years ago

akshayred commented 5 years ago

Hi,

I am trying to create a new node dynamically once value in a input field is filled in another node. I have tried following code which I created using 2 examples.

https://codepen.io/akshaykelotra/pen/rPbORY

Do you know what I am doing wrong?

Ni55aN commented 5 years ago

Plugins built with rete-cli 0.5.0 and later must be used in browser as

editor.use(ConnectionPlugin.default);

but in your example you have older version (without default export in UMD), so you need to update plugins

akshayred commented 5 years ago

I updated the plugins. But when I update the rete js to 1.1.1, this starts to give error t.install is not defined.

When I change the editor.use(VueRenderPlugin); to editor.use(ConnectionPlugin.VueRenderPlugin); It gives error that t is not defined. Can you please help?

Ni55aN commented 5 years ago

Updating from rete@1.1.0 to rete@1.1.1 does not affect this error. You updated the rete-connection-plugin to a version with rete-cli 0.5.0 (or later), therefore * .min.js will return the default export as the "default" property

https://rete.js.org/#/docs -> Installation without bundlers (Webpack, Rollup, etc.)

https://github.com/retejs/rete/issues/249#issuecomment-461757249