I have a selectizeInput UI object in my Shiny app and I would like to be able to copy and paste a comma-delimited list of inputs (i.e. copy from and paste to the selectizeInput).
At the moment I can copy the comma-delimited list of inputs (i.e. A, B, C, D) from elsewhere and then paste it in my selectizeInput. Paste only works using "Ctrl + V", not "right-click + paste", but this is fine.
I would like to be able to also copy my inputs from the selectizeInput object so I can paste them elsewhere.
See code below (the first choice is an empty string, "", as I do not want anything to be selected at the beginning):
selectizeInput(
inputId = "genes_list",
label = "Genes",
width = "100%",
multiple = TRUE,
choices = c("", genes),
selected = "",
options = list(
delimiter = ',',
create = I("function(input, callback){
return {
value: input,
text: input };
}")))
I can select all inputs using "Ctrl + A" or specific inputs using "Ctrl + mouse-click" (I know inputs have been selected as they change color when selected) but then "Ctrl + C" or "Ctrl + X" do not work. Also, right-clicking on the selected inputs does not provide a "Copy" option.
Ideally, I would like to use "Ctrl + A" or "Ctrl + mouse-click" to select my inputs and then use "Ctrl + C" to copy them.
Thanks