How to dynamically create a parsys inside div via JavaScript (TouchUI / 6.4)
In AEM 6.4 TouchUI environment, I am trying to create components where custom JavaScript will execute, create a <div> element inside the component, and then add a parsys to that created <div>.
For example, I author a CustomContainer component on the page, and refresh. I have custom JavaScript code that executes on page load that checks for CustomContainer component, and builds a DOM tree inside the component. Somewhere in that DOM tree exists a <div> that needs to have a parsys available where I can drag further components.
Ideally I am looking for an existing JavaScript function like CQ.WCM.addParsys( containerElement )
I have simplified my actual use case a bit to clarify what I am trying to accomplish. It is related to building components using a custom front end framework similar to Vue/Angular/React. I also understand there may be issues with how the page structure exists in JCR; hopefully I can solve for those issues somehow once the first problem is solved.
I have found this site with documentation (CQ5 | Widgets API ) but it looks like there's a lot of information to go through there and it may take days or weeks to find what I need, if it's in there at all.
Can anybody provide information on how to achieve this? Thanks in advance.