output$trial1 <- renderPlot({
m <- highlight_key(mpg)
p <- ggplot2::ggplot(m, aes(displ, hwy)) + geom_point()
gg <- highlight(ggplotly(p), "plotly_selected")
crosstalk::bscols(gg, DT::datatable(m))
})
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.