lz100/drawer

Possibility to replace canvas with rich text editor?

Closed this issue · 3 comments

Hi,

I am trying to replace the canvas with a rich text editor (Toast UI editor) to be exact.
I am using the Shiny package shinymarkdown and would be amazing to have those available for writing a report or something similar. (https://github.com/jdtrat/shinymarkdown)

Would be there any option to do that?

Best,

Teo

lz100 commented

Hi @Teolone88 , I am not very clear what you want here. If you want to use the editor, you can just call the shinymarkdown::mdInput on your UI. shinymarkdown::mdInput and drawer::canvas can be added to the same UI.

ui <- fluidPage(
    shinymarkdown::mdInput(inputId = "editor1"),
    drawer::canvas(canvasID = "canvas")
)

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

shinyApp(ui, server)

Why do you need to replace the canvas?

I wanted to drop the picture from drawer in the rich editor but they cannot be resized, unless is canvas.
Would you be able to suggest me an alternative?

lz100 commented

This is currently not possible. The resizing ability only works if the rich editor support html5 canvas and fabirc.js. You may want to ask the author of {shinymarkdown} to support {drawer}. I cannot do anything to the editor on my end.