我正在尝试将指向R闪亮应用程序的content
函数的bs_embed_popover
变量中的URL链接
Documentation说
content:字符,弹出框正文的内容,可以是HTML
但是,我看到标签在闪亮的应用程序中显示为普通字符 我有什么想念的吗?
library(shiny)
library(bsplus)
library(htmltools)
library(shinydashboard)
# UI
ui <-
dashboardPage(
dashboardHeader(title = "Titles"),
dashboardSidebar(
use_bs_popover(),
selectInput(
inputId = "letter",
label = "Label with popover help",
choices = c("a", "b", "c")
) %>%
shinyInput_label_embed(
shiny_iconlink() %>%
bs_embed_popover(
title = "Letter", content = paste0("Choose a favorite","<a href='www.google.com'> Test link </a>")
, placement ="right"
)
)
),
dashboardBody(
tags$style(HTML('.popover-title {color:black;}
.popover-content {color:black;}
.main-sidebar {z-index:1;}')
)
))
# Server
server <- shinyServer(function(input, output) {
})
# Run the applicationenter image description here
shinyApp(ui = ui, server = server)
答案 0 :(得分:2)
您可以在html="true"
指令之后添加指令content=HTML(paste0(....
,如下所示:
bs_embed_popover(
title="Letter"
, content=paste0("Choose a favorite","<a href='www.google.com'> Test link </a>")
, placement="right"
, html="true"
)