Pen Settings



CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URL's added here will be added as <link>s in order, and before the CSS in the editor. You can use the CSS from another Pen by using it's URL and the proper URL extention.

+ add another resource


Babel includes JSX processing.

Add External Scripts/Pens

Any URL's added here will be added as <script>s in order, and run before the JavaScript in the editor. You can use the URL of any other Pen and it will include the JavaScript from that Pen.

+ add another resource


Add Packages

Search for and use JavaScript packages from npm here. By selecting a package, an import statement will be added to the top of the JavaScript editor for this package.


Save Automatically?

If active, Pens will autosave every 30 seconds after being saved once.

Auto-Updating Preview

If enabled, the preview panel updates automatically as you code. If disabled, use the "Run" button to update.

Format on Save

If enabled, your code will be formatted when you actively save your Pen. Note: your code becomes un-folded during formatting.

Editor Settings

Code Indentation

Want to change your Syntax Highlighting theme, Fonts and more?

Visit your global Editor Settings.


                <script src=""></script>


  <div id="myDiagramDiv" style="border: solid 3px red; width:500px; height:500px"></div>
  <p><a href=""/><a/></p>




function init() {
      var $ = go.GraphObject.make;  // for conciseness in defining templates
      myDiagram = $(go.Diagram, "myDiagramDiv",  // create a Diagram for the DIV HTML element
          "undoManager.isEnabled": true  // enable undo & redo

      // define a simple Node template
      myDiagram.nodeTemplate =
        $(go.Node, "Vertical",  // the Shape will go around the TextBlock
          $(go.Picture, { name: 'screenshot', background: "lime", width: 160, height: 160 },
            new go.Binding("element", "src", function(src) {
              var video = document.createElement('video');
              video.autoplay = true;
              video.onload = function() { myDiagram.redraw(); }
              video.src = src;
              return video;
            { margin: 8, font: "bold 14px sans-serif", stroke: '#333' }, // Specify a margin to add some room around the text
            // TextBlock.text is bound to
            new go.Binding("text", "key"))

      // but use the default Link template, by not setting Diagram.linkTemplate

      // create the model data that will be represented by Nodes and Links
      myDiagram.model = new go.GraphLinksModel(
          { key: "Alpha", color: "lightblue", src: '' },
          { key: "Beta", color: "orange", src: '' },
          { key: "Gamma", color: "lightgreen" },
          { key: "Delta", color: "pink" }
          { from: "Alpha", to: "Beta" },
          { from: "Alpha", to: "Gamma" },
          { from: "Beta", to: "Beta" },
          { from: "Gamma", to: "Delta" },
          { from: "Delta", to: "Alpha" }

    function playVideo() {
  } // end init