I am working AEM 6.5 , I want to add a functionality on preview mode alone, not on edit mode . I tried adding below condition . But its not working. Can someone help me out here?
<div>some code here..</div>
Try "wcmmode.preview" but when we change from edit mode to preview there wont be page refresh and this will not work as intended. You need to do a page refresh on selecting preview mode.
Hope this helps!