How to programmatically add elements to a region.
See original GitHub issueI noticed that if I append an element to a region programmatically using jquery’s prepend()
that element is not focusable or editable. I assume this is because ContentTools is unaware of the new DOM elements. How should I be alerting ContentTools about the additions to the DOM? Is there a better way to append/prepend?
Issue Analytics
- State:
- Created 7 years ago
- Comments:7 (3 by maintainers)
Top Results From Across the Web
How to add programmatically region's class when region had ...
I have one row three column region. How can I add custom class on each region when one of region is not work?...
Read more >Dynamically creating regions with Prism
I have done this in my application. Here is the code I came up with: string regionName = "MyRegionName"; ContentPresenter RegionContentControl = new ......
Read more >Create region programmatically
P/s: When i try to insert region in Java : RichRegion region = new RichRegion(); region.setVisible(true); region.setRendered(true); ValueExpression value ...
Read more >Creating Regions Dynamically
You can dynamically create regions in your application code and automatically instantiate them on members of a cluster.
Read more >Creating Regions Dynamically | Geode Docs
DynamicRegionFactory class to dynamically create regions, or you can create them using the <dynamic-region-factory> element in the cache.xml file that ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@bcreeves sorry completely missed this, not sure how. So yes what you’d ideally do is add a ContentEdit element to the ContentEdit region rather than a DOM element. For example:
You’re mixing DOM elements and ContentEdit elements here, so region is a ContentEdit element (or collection) that has child ContentEdit elements (like Text, Image, Video, etc). It doesn’t know how to remove the DOM element you’re selecting, you’d need to pass the
detatch
method the ContentEdit element.If you want to find an element in the region using the associated DOM element you could do something like:
Moving back to your previous question, you can’t add DOM elements into the DOM element representing the region, you can however create a DOM element, parse it using the correct class in ContentEdit, and add it to the region: