Add custom preview directive