The Teaser WYSIWYG editor is missing all of the site CSS. How do I supply CSS to the teaser page?
I have a relatively simple component that is constructed out of text and divs, and styled with CSS classes. In a normal authoring page this works great, but when I try to use this component in a teaser, the author sees a completely blank white area with some text in it. The site CSS is missing in the teaser edit page.
Of course I can re-output the site's css inside my component in edit mode, but this appears to lead to the CSS being applied twice (or more times) in preview. It causes the page to flicker, and with this solution I have to keep using it everywhere; every component will need to repeatedly output the entire site's CSS just to be usable in the teaser page. (Here I actually included a jsp that outputs all the CSS I need.)
<%@page import="com.day.cq.wcm.api.WCMMode"%> <%@page session="false" %> <% if (WCMMode.fromRequest(request) != WCMMode.DISABLED) { %><%@include file="/apps/myApp/components/pages/headlibs.jsp"%><% } %>Is there a real solution to getting the site CSS in the teaser edit page, so the campaign authors can see what they're doing? Can I add something to this JSP programatically so that I don't re-include the CSS if it's already been included?