JohnCoene / cicerone

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

how to embed HTML tags into $step description field #22

Closed HeleneRoyo closed 3 years ago

HeleneRoyo commented 3 years ago

Is it possible to enhance the description text so that we can display text in italic, insert new lines, display lists?

image

JohnCoene commented 3 years ago

In the latest version, currently on its way to CRAN, you can use {htmltools} and {shiny} tags in the title and description. Since it's not built on CRAN yet you will need to use the dev version from github remotes::install_github("JohnCoene/cicreone").

library(cicerone)

guide <- Cicerone$
  new()$ 
  step(
    el = "text_inputId",
    title = "Text Input",
    description = p("This is in", strong("bold"))
  )$
  step(
    "submit_inputId",
    p("Send the", tags$i("italic"), "text"),
    "Send the text to the server for printing"
  )
HeleneRoyo commented 3 years ago

Thanks a lot, great enhancement with the dev branch! remotes::install_github("JohnCoene/cicerone")