在闪亮应用程序的 UI 中为文本添加新行

Get*_*tch 5 r shiny

有没有办法在通过 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!")
)
Run Code Online (Sandbox Code Playgroud)

但新线路似乎不起作用。

M45*_*55y 9

\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!")
     )
    )
  )
Run Code Online (Sandbox Code Playgroud)