Here is a hacky solution that does the job for now.
if (knitr::is_html_output()) { knitreg. = texreg::htmlreg } else { knitreg. = texreg::knitreg }