JohnCoene / cicerone

🏛️ Give tours of your Shiny apps
https://cicerone.john-coene.com
Other
187 stars 7 forks source link

Text output in paragraphs #54

Open VictoriaLatham opened 1 year ago

VictoriaLatham commented 1 year ago

Hi,

I have added the cicerone package to my shiny app so that a user guide initiates when you open the app. However, I want to have one of the pop-up text boxes containing two separate paragraphs (separated by a space). Is this possible?

Thanks

Vicki

etiennebacher commented 1 year ago

You can use any HTML tag you want in the description argument of step(). To break lines, you can use <br> (but you can also write bold some text, etc.):

library(shiny)
library(cicerone)

guide <- Cicerone$
  new()$ 
  step(
    el = "text_inputId",
    title = "Text Input",
    description = "This is where you enter the text you want to print.<br><br>You can have several paragraphs.<br><br> And some <b>bold text</b>."
  )

ui <- fluidPage(
  use_cicerone(), 
  textInput("text_inputId", "Enter some text")
)

server <- function(input, output){
  guide$init()$start()
}

shinyApp(ui, server)

image

VictoriaLatham commented 1 year ago

thank you :)