Pen Settings

HTML

CSS

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

JavaScript

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

Behavior

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.

HTML

            
              <div class="container-fluid bg-faded">
 <nav id="topNav" class="navbar navbar-fixed-top navbar-light">
    <div class="container">
        <button class="navbar-toggler hidden-md-up pull-right" type="button" data-toggle="collapse" data-target="#collapsingNavbar">
            ☰
        </button>
        <a class="navbar-brand page-scroll" href="https://facebook.github.io/react/docs/react-component.html" target='_blank' rel='noopener'>React</a>
        <div class="collapse navbar-toggleable-sm" id="collapsingNavbar">
            <ul class="nav navbar-nav">
                <li class="nav-item">
                    <a class="nav-link" href="https://v4-alpha.getbootstrap.com/components/card/" target='_blank' rel='noopener'>Cards</a>
                </li>
                <li class="nav-item">
                    <a class="nav-link" href="https://codepen.io/anthonygallina/pen/zvLPxp" target='_blank' rel='noopener'>Twitch TV</a>
                </li>
                <li class="nav-item">
                    <a class="nav-link" href="https://codepen.io/anthonygallina/full/qdYzdP/" target='_blank' rel='noopener'>Quotes</a>
                </li>
                <li class="nav-item">
                    <a class="nav-link" href="https://codepen.io/anthonygallina/full/yVyMZm/" target='_blank' rel='noopener'>Animation</a>
                </li>
            </ul>
        </div>
    </div>
</nav>

<section id="mt">      
    </section> 
</div>   
            
          
!

CSS

            
              /* Rebuilt with PUG, SCSS, twitter bootstrap 4.0.0-alpha.4, Bootstrap New in Bootstrap 4, open source,React,Marked */
@import url(https://fonts.googleapis.com/css?family=Ubuntu:700);
html { width: 100%; height: 100%; } 

body { width: 100%; height: 100%; font-family: "Ubuntu", "Helvetica Neue", Arial, sans-serif; color: #00332f; webkit-tap-highlight-color: #222; top: 0; } 

#mt{ margin-top: 5rem;}
.nav-item{ margin-top: 0.2rem;} 
.navbar { color: #931616; background-color: #ffffff;}
.slider{
  overflow-x: hidden;
  -webkit-animation: easeIn 2s forwards;
  -moz-animation: easeIn 2s forwards;
  animation: easeIn 2s forwards;
}
@-webkit-keyframes easeIn {
  0% {
    transform: translateX(-800px);
  }
  100% {
    transform: translateX(0);
  }
}
@-moz-keyframes easeIn {
  0% {
    transform: translateX(-800px);
  }
  100% {
    transform: translateX(0);
  }
}
@keyframes easeIn {
  0% {
    transform: translateX(-800px);
  }
  100% {
    transform: translateX(0);
  }
}

   
            
          
!

JS

            
              "use strict";
marked.setOptions({
    gfm: true,
    sanitize: false
}); 

class Pad extends React.Component {
  constructor (props) {
    super(props)
  }
  
  render() {
    const text = this.props.text
    const onChange = this.props.onChange
    return (
      <textarea className="form-control" id="pad" onChange={ onChange } defaultValue={text}></textarea>
    )
  }
}

class Markdown extends React.Component {
  constructor (props) {
    super(props)
  }
  
  render() {
    return <div id="markdown" dangerouslySetInnerHTML={{ __html: this.props.text }}></div>
  }
}

class App extends React.Component {
  constructor (props) {
    super(props)
    this.state = {
      text: "Hello react!"
    }
    this._update = this._update.bind(this)
  }
  render() {
    const text = this.state.text
    return (
   <div className="container">
        <h2>Mark up editor</h2>
        <p className="lead">
            Enter <a href="https://guides.github.com/features/mastering-markdown/" target='_blank' rel='noopener'>Git Hub mark down</a> in the left <code>.card</code>as <code>#GFM</code> and a <code>#html</code> preview will display in the right<code>.card</code>.
        </p>
        <div className="card-group slider">
            <div className="card">
                <img className="card-img-top img-fluid" src="https://dl.dropboxusercontent.com/s/9kf8fc83ml08yat/markup.jpg?" alt="Pen and wire frame" />
                <div className="card-block">
                    <h4 className="card-title">Left card text input area</h4>
                  
                  

                  
                  
                  
                  
                    <p className="card-text" id="pad"><Pad text={ text } onChange={ this._update }/></p>
                </div>
            </div>
            <div className="card slider">
                <img className="card-img-top img-fluid" src="https://dl.dropboxusercontent.com/s/q8nwy2kr8laefjw/laptop.jpg?" alt="Lap top card preview area" />
                <div className="card-block">
                    <h4 className="card-title">Right card preview area</h4>
                  <Markdown className="card-text" text={ marked (text) }/>
                    <p className="card-text">test</p>                  
                </div>
            </div>
        </div>
    </div>
    )
  }
  
_update(e) {

var __html =marked(e.target.value);
  this.setState({ text: __html})
  }
}

ReactDOM.render(<App />, document.getElementById('mt'))


            
          
!
999px

Console