Adding _updatePreview and setPreviewElement methods
Adding example