Wire up self-created contentarea widget to contentarea property on type?



We are trying to create a complicated editor widget that includes contentarea widgets in it.  We have tried getting and serializing the values ourselves and this works but it just doesn't give us on page edit support and creates other problems we are not sure how to fix.  

So the other simple solution is for us to create ContentArea properties on our type model (set them to not show up in forms editing, as to not confuse the editors) and then in OUR widget, we instantiate a bunch of content area widgets from "epi-cms/contentediting/editors/ContentAreaEditor" - this is simply for the forms editing mode - i'd like to wire these up so they know which properties they actually connect to, so the events they have in place take over and do their own thing and save to the data model.  This will allow us not to care about doing anything with the content areas other then where they appear rendered in our parent widget.  The other values we care about and set we can serialize and use on our own.  This will also enable us to do PropertyFor's in our MVC view to enable on page editing support and not have to do any crazy work arounds or hacks to get this to work.

Anyone have any ideas on how to wire up these "self-placed" contentarea widgets to the actual properties on the model?

Apr 29, 2015 16:19

Also I should note, when we create the contentarea widgets inside our dojo widgets, the value we get is of an object type, but the value that the ContentArea type in c# expects is XhtmlString type (since ContentArea extends that) and this obviously messes everything up - this is the reason we'd rather be able to create the widget inside our widget (since we can place it nicely next to our other movable peices) and wire it up to a property on the actual page model so it does everything saving wise etc itself as we are not sure how the "value" gets converted into an HTML div block that epi knows how to use on the front end, etc.  

It's very confusing but all in all - i just want to make a complex editor widget that contains content areas that wire up to actual properties on the page type and have the widget, etc. just do their own thing via saving when native events occur.

Apr 29, 2015 17:02

Anyone have any clues as to how we might be able to achieve this?

Apr 30, 2015 15:03
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.