Pen Settings



CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URLs 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 its URL and the proper URL extension.

+ 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.


Auto Save

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.


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

<body class="lc-default-theme">
  <div class="lc-feed-container">

    <div id="master-container"></div>

    <div style="text-align: center">
      <button class="lc-load-more" id="lc-load-more">Load more</button>


  <script src=""></script>




                (function (document, NcPosts, axios, extensionContainer) {
  //Get the HTML elements
  var button = document.getElementById("lc-load-more");
  var container = document.getElementById("master-container");
  var channelId = 32262;

  //Create a backendService and a bulletinProvider to receive posts from the server via HTTP
  var backendSvc = new NcCore.StandardBackendService(
  var bulletinProvider = new NcPosts.BulletinTenantProvider(

  //Create the renderers that will be used to render inline content
  var inlineRenderers = [
    new NcPosts.ImageInlineRenderer(),
    new NcPosts.CustomInlineRenderer()
    //Your custom inline renderers and extensions goes here!

  //Create the post renderers that will be used to render post contents
  var postRenderers = [
    new NcPosts.HeaderRenderer(function (d) {
      return d.toLocaleDateString() + ", " + d.toLocaleTimeString();

    new NcPosts.TitleRenderer(),
    new NcPosts.ExtendedContentRenderer(inlineRenderers), //<-- This is where the inline renderers is used
    new NcPosts.LinkCardRenderer(),
    new NcPosts.ImageRenderer()
    //Your custom post renderers and extensions goes here!
  //Append post renderers from extensions
  appendExtensionInstances("postRenderer", postRenderers);
  postRenderers.push(new NcPosts.TagsAndQuantsRenderer());

  var listManager = NcPosts.PostListManager.withRenderers(postRenderers);

  //Get the initial object from HTTP
  bulletinProvider.getFeedInitial(channelId).then((d) => {

    //Check if the button to show more should be displayed or not = d.hasMore ? "block" : "none";

  //Setup websocket streaming
  var wsProtocol = window.location.hostname === "localhost" ? "ws" : "wss";
  var wsProvider = new NcPosts.BulletinWebSocketProvider(
    wsProtocol + "://" + "" + "/",

    (d) => listManager && listManager.handleServerUpdateObject(d),
    () => console.log("Websocket opened"),
    () =>
        "Websocket closed - reconnect logic should fire, or fallback to HTTP"

  //Register a click handler to load more posts when clicked
  button.onclick = function () {
    var cutoffId = listManager.getLowestId();

      .getFeedEarlierThanCutoffIdObj(channelId, cutoffId)
      .then(function (d) {
        if (d.hasMore) {
 = "block";
        } else {
 = "none";


  //Handling of extensions
  function appendExtensionInstances(extensionType, arr) {
    if (!extensionContainer) return;

    var extensions = extensionContainer[extensionType];

    if (!extensions) return;

    for (var i = 0; i < extensions.length; i++) {
      try {
      } catch (e) {
        console.log("Error instantiating extension " +;
})(document, NcPosts, axios, window.NcLiveCenterExtensions);