etiennebacher / prompter

Add tooltips in Shiny apps with hint.css
https://prompter.etiennebacher.com/
Other
41 stars 1 forks source link

display greek letters? #8

Closed rdiaz02 closed 2 years ago

rdiaz02 commented 2 years ago

Hi, Is it possible to display Greek letters in the message? The first image shows what I'd like. The second what I am getting with prompter. I've tried using message = paste(Θ) and message = HTML(Θ) as well as using Θ instead of Θ, without success.

What I'd like:

display_greek

What I am getting with prompter:

prompter-no-html

etiennebacher commented 2 years ago

Hello, I'm not sure using HTML codes work but I'll keep investigating on that. However, it seems that you can simply pass the greek letter directly in the text:

library(prompter)
library(shiny)

ui <- fluidPage(

  use_prompt(),

  add_prompt(
    actionButton("plot", "click"), 
    position = "bottom", message = "this is a greek letter: Θ"
  )

)

server <- function(input, output, session) {}

shinyApp(ui, server)
rdiaz02 commented 2 years ago

Thanks a lot! And now that I see it, it was obvious. Sorry this did not occur to me. I guess we can close it, since the problem is solved.