【问题标题】:Add new line to text in UI of shiny app在闪亮应用的 UI 中为文本添加新行
【发布时间】:2015-07-15 04:01:35
【问题描述】:

有没有办法在通过 UI 输入文本时添加新行?

我目前有类似的东西

mainPanel(
h3("This is my app!\n\n"),
h4("Download your data using the choose file button\n\n"),
h4("Thank you for using the app!")
)

但新行似乎不起作用。

【问题讨论】:

  • 你可以试试br()

标签: r shiny


【解决方案1】:

\n 在闪亮的应用程序中不起作用。 对于新行,您可以使用 HTML 标记 <br/>:

  mainPanel(
    HTML(
     paste(
      h3("This is my app!"),'<br/>',
      h4("Download your data using the choose file button"),'<br/>',
      h4("Thank you for using the app!")
     )
    )
  )

【讨论】:

    猜你喜欢
    • 2017-07-27
    • 2020-06-16
    • 1970-01-01
    • 2019-10-23
    • 1970-01-01
    • 1970-01-01
    • 2014-06-07
    • 1970-01-01
    • 2021-06-13
    相关资源
    最近更新 更多