I think you can do this on client side without any server-side processing, like this:
list$.colorbox({ html: $("your client-side selector for t:cardLightbox html").html() }); Just render your component inside of HTML as usual. One thing you will want to do is, probably, to make your html invisible on client side, by putting it to "display: none" container. On Thu, Sep 19, 2013 at 1:47 PM, Ben Titmarsh <ben.titma...@hotmail.co.uk>wrote: > Hi All, > > I am using the colorbox JS library for lightboxes in my app. All you do > is pass some markup in as a JSON field 'html' and it pops the markup up in > a lightbox. So I'm doing this: > > $.colorbox({html:"<t:cardLightbox cubeId="cubeId"/>"}); > > With the cardLightbox component being responsible for generating the > markup. The cardlightbox component contains lots of unescaped quotes in > it's template and I end up with the following JS error: > > SyntaxError: missing } after property list$.colorbox({html:"<div > id="lightboxContainer"><div class="card"><img height="285...I'm wondering > is there either a component I can pass the markup into to escape the > quotes, or another approach to generate this markup as a valid JSON string? > I know that I could do away with the template for cardLightbox entirely > and use a MarkupWriter but just wondering if there is a better option. > > Cheers, > Ben. > -- Dmitry Gusev AnjLab Team http://anjlab.com