Hao Zhu | eaef431 | 2018-01-10 17:05:23 -0500 | [diff] [blame^] | 1 | #' @export |
2 | print.kableExtra <- function(x) { | ||||
3 | html_header <- htmltools::tags$head( | ||||
4 | rmarkdown::html_dependency_jquery(), | ||||
5 | rmarkdown::html_dependency_bootstrap(theme = "simplex") | ||||
6 | ) | ||||
7 | |||||
8 | html_table <- htmltools::HTML(as.character(x)) | ||||
9 | cat(as.character(x)) | ||||
10 | htmltools::html_print(htmltools::tagList(html_header, html_table)) | ||||
11 | } | ||||
12 | |||||
13 | |||||
14 | #' @export | ||||
15 | knit_print.kableExtra <- function(x) { | ||||
16 | x <- paste0(x, "\n\n") | ||||
17 | asis_output(x) | ||||
18 | } | ||||
19 | |||||
20 | |||||
21 | |||||
22 |