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

Packages

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.

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.

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.

HTML

              
                <div id="app"></div>
              
            
!

CSS

              
                #app  
  padding-top: 10px    
textarea
  background-color: black
  color: green
  resize: vertical
  height: 100%
  width: 100%
.h
  text-align: center
  color: #767474
  
  
  
  
    
    
   
              
            
!

JS

              
                 var Editor = React.createClass({
   getInitialState: function() {
     return {
       value: 'Lorem ipsum \n=======\n\nconsectetur adipiscing elit, sed do eiusmod tempor\n-----------\n \n### consectetur adipiscing elit, sed do eiusmod tempor\n \nsed do eiusmod tempor\nsed do eiusmod tempor\n\nconsectetur adipiscing elit, sed do eiusmod tempor \nconsectetur \n\nconsectetur adipiscing elit, sed do eiusmod tempor *italic*, **bold**, \n`monospace`, ~~strikethrough~~ .\n\nvelit esse cillum dolore eu \n\n  * pariatur\n  * pariatur\n  * pariatur\n\nExcepteur sint\n\n  1. pariatur\n  2. pariatur\n  3. pariatur\n\nExcepteur sint occaecat cupidatat non \n\n '
     };
   },
   handleChange: function(event) {
     this.setState({
       value: event.target.value
     });
   },
   rawMarkup: function(value) {
     var rawMarkup = marked(value, {
       sanitize: true
     });
     return {
       __html: rawMarkup
     };
   },
   render: function() {
     return (
       <div className="MarkdownEditor">
         <h1 className= "h">Markdown Previewer</h1>
         <div className="row">           
            <div className="col-md-6">
       
        <textarea rows="22"
          onChange={this.handleChange}
          ref="textarea"
          value= {this.state.value}
          /></div>
            <div className="col-md-6">
       
        <div
          className="content"
          dangerouslySetInnerHTML=
           {this.rawMarkup(this.state.value)}
          /></div>
      </div></div>
     );
   }
 });

 ReactDOM.render(<Editor />, document.getElementById("app"));
              
            
!
999px

Console