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.


                <div id="root"></div>


  margin: 0;
  padding: 0;
    font-family: 'Roboto', sans-serif;


.app {
  text-align: center;

.app-header {
  background-color: #EF494F;
  padding: 5px;
  color: white;

.content {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-around;
  margin-top: 20px;
  color: #444444;

.markdown-input {
  flex-grow: 1;

.markdown-input textarea {
  border-radius: 4px;

.markdown-result {
  text-align: left;
  flex-grow: 1;
  padding-left: 10px;
  overflow: hidden;



                class App extends React.Component {
  constructor() {
    this.state = {
      markdownInput: 'Heading\n=======\n\nSub-heading\n-----------\n \n### Another deeper heading\n \nParagraphs are separated\nby a blank line.\n\nLeave 2 spaces at the end of a line to do a  \nline break\n\nText attributes *italic*, **bold**, \n`monospace`, ~~strikethrough~~ .\n\nShopping list:\n\n  * apples\n  * oranges\n  * pears\n\nNumbered list:\n\n  1. apples\n  2. oranges\n  3. pears\n\nThe rain---not the reign---in\nSpain.\n\n *[Herman Fassett](*'
    this.update = this.update.bind(this);

  update(event) {

  convertMarkdown(string) {
    const markdownResult = marked(string, {sanitize: true});
    return {__html: markdownResult}

  render() {
    return (
      <div className="app">
        <div className="app-header">
          <h2>Markdown Previewer</h2>
        <div className="content">
          <div className="markdown-input">
            <textarea cols="50" rows="25" value={this.state.markdownInput} onChange={this.update}/>
          <div className="markdown-result">
            <span dangerouslySetInnerHTML={this.convertMarkdown(this.state.markdownInput)}/>

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