title: Shiny leaflet easyPrint plugin
body: <p>I'm trying to incorporate the <a href="https://github.com/rowanwins/leaflet-easyPrint" rel="noreferrer">easyPrint plugin</a> into my shiny leaflet app.  What I want is something that looks like <a href="http://rowanwins.github.io/leaflet-easyPrint/" rel="noreferrer">the demo</a>, but in shiny.</p>
  
  <p>I have tried to mimic <a href="https://gist.github.com/jcheng5/c084a59717f18e947a17955007dc5f92" rel="noreferrer">the examples</a>, but have been unsuccessful.</p>
  
  <p>Here's my code for my R code so far:</p>
  
  <pre><code>    library(shiny)
      library(shinydashboard)
      library(shinyjs)
      library(htmlwidgets)
      library(htmltools)
      library(leaflet)
      library(leaflet.extras)
      library(sp)
  
      shinyApp(
    ui = fluidPage(
      leafletOutput("map", height = 750)
    ),
    server = function(input, output) {
  
      registerPlugin &lt;- function(map, plugin) {
        map$dependencies &lt;- c(map$dependencies, list(plugin))
        map
      }
  
      easyPrintPlugin &lt;- htmlDependency("leaflet-easyprint", "2.1.8",
                                        src = c(href = "https://github.com/rowanwins/leaflet-easyPrint/blob/gh-pages/dist/"),
                                        script = "index.js")
  
      # Map
      output$map &lt;- renderLeaflet({
        leaflet() %&gt;%
          addProviderTiles(providers$CartoDB.Positron) %&gt;%
          registerPlugin(easyPrintPlugin) %&gt;%
          onRender("function(el, x) {
                   L.easyPrint({
                   position: 'topleft',
                   sizeModes: ['A4Portrait', 'A4Landscape']
                   }).addTo(map);}")
      })
  
    }
  )
  </code></pre>
  
  <p>However, nothing is happening.  It's literally a white screen.  If I remove the onRender part, the leaflet acts normal.</p>
  
  <p>Unfortunately, I'm relatively new to Shiny, leaflet, .js, and github, so I'm struggling to identify which aspect is causing the problem.</p>