我有这个应用程序:
ui <- fluidPage(
uiOutput("preview")
)
server <- function(input, output, session) {
deployExeList<-function(){
return(
list(splitLayout(
id=paste0("slexe")
,shiny::div(class = "",style = "width: 100%;",
shiny::withMathJax(
shiny::HTML(
markdown::markdownToHTML(text = "### **aaa/bbbb: ccc000.**\n### In recent years, automatic analyses using novel NLP methods have been used to investigate language abnormalities in schizophrenia. In contrast, only a few studies used automated language analyses in bipolar disorder. To our knowledge, no previous research compared automated language characteristics of first-episode psychosis (FEP) and bipolar disorder (FEBD) using NLP methods"
,fragment.only = TRUE)
)
)
)
)
)
)
}
output[["preview"]]<-renderUI({deployExeList()})
}
shinyApp(ui = ui, server = server)
如何将内容固定到屏幕宽度?我的意思是,我想阻止水平滚动条:
将
white-space: normal;
分配给您的 div
:
library(shiny)
ui <- fluidPage(uiOutput("preview"))
server <- function(input, output, session) {
deployExeList <- function() {
return(list(splitLayout(
id = paste0("slexe")
,
shiny::div(
class = "",
style = "white-space: normal;",
shiny::withMathJax(shiny::HTML(
markdown::markdownToHTML(text = "### **aaa/bbbb: ccc000.**\n### In recent years, automatic analyses using novel NLP methods have been used to investigate language abnormalities in schizophrenia. In contrast, only a few studies used automated language analyses in bipolar disorder. To our knowledge, no previous research compared automated language characteristics of first-episode psychosis (FEP) and bipolar disorder (FEBD) using NLP methods"
, fragment.only = TRUE)
))
)
)))
}
output[["preview"]] <- renderUI({
deployExeList()
})
}
shinyApp(ui = ui, server = server)