add callback when click to toolbar, add style for preview