Reputation: 985
The below HTML code renders properly on shiny
> HTML(paste0(strwrap('I saw a beautiful moon tonight',width=10), collapse="\n"))
I saw a
beautiful
moon
tonight
But when the same in wrapped inside the action button, it is not
actionButton("df", HTML(paste0(strwrap('I saw a beautiful moon tonight',width=10), collapse="\n")))
Expected output
Even inside the button , the sentence should be split into 4 lines
Upvotes: 1
Views: 265
Reputation: 5481
Use br
html tag instead of \n
for breaklines:
actionButton("df", HTML(paste0(strwrap('I saw a beautiful moon tonight',width=10), collapse="</br>")))
Upvotes: 3