Created
November 25, 2015 12:06
-
-
Save nassimhaddad/5514a844328f91f99191 to your computer and use it in GitHub Desktop.
coloring cells using rhandsontable
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
DF = data.frame( | |
title = 1:4, | |
dummy = rep(NA, 4), | |
desc = c("1", "2", "3", | |
'<span style="width:100px;height:100px;background:#354B96;display:inline-block;color:white;">5</span>'), | |
stringsAsFactors = FALSE | |
) | |
library(rhandsontable) | |
rhandsontable(DF, allowedTags = "<em><b><span><strong><a><big>", | |
width = 800, height = 500, rowHeaders = FALSE) %>% | |
hot_cols(colWidths = c(200, 200, 100)) %>% | |
hot_col(1:3, renderer = NULL) %>% | |
hot_col(1:3, renderer = htmlwidgets::JS("safeHtmlRenderer")) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment