title: How to Export ggplotly from R shiny app as html file
body: <p>I have a ggplotly object called p2 in my shiny app. I want it to work where if a user presses a downloadButton in the app UI, it will download the ggplotly plot as an html file. But the function doesn't work:</p>
  
  <pre><code>output$Export_Graph &lt;- downloadHandler(
  
        filename = function() {
          file &lt;- "Graph"
  
        },
  
        content = function(file) {
          write(p2, file)
        }
  
  </code></pre>
  
  <p>Any ideas?</p>