css Audio - Active file-generic CSS - Active Generic - Active HTML - Active JS - Active SVG - Active Text - Active file-generic Video - Active header Love html icon-new-collection icon-person icon-team numbered-list123 pop-out spinner split-screen star tv

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. If you link to another Pen, it will include the CSS from that Pen. If the preprocessor matches, it will attempt to combine them before processing.

+ add another resource

You're using npm packages, so we've auto-selected Babel for you here, which we require to process imports and make it all work. If you need to use a different JavaScript preprocessor, remove the packages in the npm tab.

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

Use npm Packages

We can make npm packages available for you to use in your JavaScript. We use webpack to prepare them and make them available to import. We'll also process your JavaScript with Babel.

⚠️ This feature can only be used by logged in users.

Code Indentation

     

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.

HTML Settings

Here you can Sed posuere consectetur est at lobortis. Donec ullamcorper nulla non metus auctor fringilla. Maecenas sed diam eget risus varius blandit sit amet non magna. Donec id elit non mi porta gravida at eget metus. Praesent commodo cursus magna, vel scelerisque nisl consectetur et.

            
              <!--
Narrow jumbotron
Build a more custom page by narrowing the default container and jumbotron. 
-->
<div class="container">
      <div class="header">
        <ul class="nav nav-pills pull-right">
          <li class="active"><a href="http://www.openf2.org">Home</a></li>
          <li><a href="http://docs.openf2.org">Docs</a></li>
          <li><a href="https://github.com/OpenF2/F2">GitHub</a></li>
        </ul>
        <h3 class="text-muted">F2 Demo</h3>
      </div>

      <div class="jumbotron">
        <h1>Jumbotron heading</h1>
        <p class="lead">This out-of-the-box Boostrap 3 template has been modified slightly to demonstrate placement of two F2 Apps alongside exsting content. The Apps have <span style="color:red">red</span> outlines to show their location.</p>
        <p><a class="btn btn-lg btn-success" href="http://www.openf2.org" role="button">Go to OpenF2.org</a></p>
      </div>

      <div class="row marketing">
        <div class="col-sm-4">
          <h4>Subheading</h4>
          <p>Donec id elit non mi porta gravida at eget metus. Maecenas faucibus mollis interdum.</p>

          <h4>Subheading</h4>
          <p>Morbi leo risus, porta ac consectetur ac, vestibulum at eros. Cras mattis consectetur purus sit amet fermentum.</p>

          <h4>Subheading</h4>
          <p>Maecenas sed diam eget risus varius blandit sit amet non magna.</p>
        </div>
        <div class="col-sm-8" id="com_openf2_examples_nodejs_helloworld"></div>
 	 </div>
 	<div class="row marketing">
        <div class="col-lg-6">
          <h4>Subheading</h4>
          <p>Donec id elit non mi porta gravida at eget metus. Maecenas faucibus mollis interdum.</p>

          <h4>Subheading</h4>
          <p>Morbi leo risus, porta ac consectetur ac, vestibulum at eros. Cras mattis consectetur purus sit amet fermentum.</p>

          <h4>Subheading</h4>
          <p>Maecenas sed diam eget risus varius blandit sit amet non magna.</p>
        </div>
      </div>
  
    <div class="row marketing">
      <div class="col-sm-12">
        <div id="com_openf2_examples_csharp_marketnews">
          <h2 class="page-header">Yahoo! Business Headlines</h2>
        </div>
      </div>
    </div>

      <div class="footer">
        <p>&copy; Markit On Demand, Inc. 2014</p>
      </div>

    </div> <!-- /container -->
            
          
!
            
              @import "https://maxcdn.bootstrapcdn.com/bootstrap/3.1.1/css/bootstrap.min.css";
@import "https://getbootstrap.com/examples/jumbotron-narrow/jumbotron-narrow.css";

.f2-app-container {
  outline: 1px dotted red;
  padding: 0 10px 10px 10px;
}

.com_openf2_examples_nodejs_helloworld h1.page-header {
  margin-top: 5px;
}

.com_openf2_examples_csharp_marketnews ul {
  list-style: none;
  padding: 0;
}
            
          
!
            
              $(function(){
  //get AppHandler token
  var _token = F2.AppHandlers.getToken();
  //create & assign a "root" element for the App
  F2.AppHandlers.on(
    _token,
    F2.Constants.AppHandlers.APP_CREATE_ROOT,
    function(appConfig) {
		appConfig.root = document.getElementById(appConfig.appId);
    }
  );
  //render the App
  F2.AppHandlers.on(
    _token,
    F2.Constants.AppHandlers.APP_RENDER,
    function(appConfig, appHtml) {
      $(appConfig.root).append(appHtml);
    }
  );
  //init F2 & register Apps
  F2.init();
  F2.registerApps([
    {
      appId: 'com_openf2_examples_nodejs_helloworld',
      manifestUrl: 'http://www.openf2.org/F2/apps'
    },
    {
      appId: 'com_openf2_examples_csharp_marketnews',
      manifestUrl: 'http://www.openf2.org/F2/apps'
    }
  ]);
});  
            
          
!
999px
🕑 One or more of the npm packages you are using needs to be built. You're the first person to ever need it! We're building it right now and your preview will start updating again when it's ready.
Loading ..................

Console