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


Babel is required to process package imports. If you need a different preprocessor remove all packages first.

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


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.

Editor Settings

Code Indentation

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

Visit your global Editor Settings.

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.


              <script src="//"></script> 
<link href="//" rel="stylesheet">
<script src="//"></script>
<script src="//"></script>

<div class="panel panel-default">
  <div class="panel-heading">Lobby Chat</div>
  <ul class="list-group" id="chat-output"></ul>
  <div class="panel-body">
    <form id="chat">
      <div class="input-group">
        <input type="text" class="form-control" id="chat-input" />
        <span class="input-group-btn">
          <button type="submit" class="btn btn-default">Send Message</button>


              body {
  padding: 10px;
#chat-output {
  height: 150px;
  overflow-y: scroll;


              // use jQuery to find the DOM elements we care about
var $input = $('#chat-input'); // where the user inputs chat text
var $output = $('#chat-output'); // where output is sent

// start pubnub
var pubnub = PUBNUB.init({
  publish_key: 'demo',
  subscribe_key: 'demo'

var channel = 'memewarz-lobby-demo';

// when the "send message" form is submitted
$('#chat').submit(function() {
  // publish input value to channel 
    channel: channel,
    message: $input.val()
  // clear the input field
   // cancel event bubbling
  return false;

// when we receive messages
  channel: channel, // our channel name
  message: function(text) { // this gets fired when a message comes in
    // create a new line for chat text
    var $line = $('<li class="list-group-item" />');
    // filter out html from messages
    var $message = $('<span class="text" />').text(text).html();
    // build the html elements
    // scroll the chat output to the bottom