Added solution for edit mode not removing html but adding a hidden class to widgets so it looks consistent with the preview mode view.