Last Updated: February 25, 2016
·
421
· yassoraa88

code to enable external links on monocle frames

// including monocle files

  <script src="scripts/monocore.js"></script>
  <script src="scripts/monoctrl.js"></script>
  <link rel="stylesheet" type="text/css" href="styles/monocore.css" />
  <link rel="stylesheet" type="text/css" href="styles/monoctrl.css" />


  <script>
   function createStencil(rdr) {
    var stencil = new Monocle.Controls.Stencil(rdr);
    rdr.addControl(stencil);
    // This line is useful mostly for testing:
    // it highlights the stencil's link cutouts.
    stencil.toggleHighlights();
  }

  Monocle.Reader(' focused_item_id ',null, null,  function (rdr) {
  window.reader = rdr;

  createStencil(rdr);
});</script>