I've located a function called
MatrixInput.js but I can not figure out how to call it from my JS code. I've explored both the global
Garnish - without finding the function. I could recreate the entire html of the element, but that seems unnecessary when there are helper functions that I could reach for.
Looks like craft is creating one var for each block available on the page with the following code:
var matrixInput = new Craft.MatrixInput("...") var matrixInput = new Craft.MatrixInput("...")
It would also be great to have the arguments that needs to be passed to the function - is there any documentation or anyone who struggled with this previously that can point me in the right direction?