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

You're using npm packages, so we've auto-selected Babel for you here, which we require to process imports and make it all work. If you need to use a different JavaScript preprocessor, remove the packages in the npm tab.

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

Use npm Packages

We can make npm packages available for you to use in your JavaScript. We use webpack to prepare them and make them available to import. We'll also process your JavaScript with Babel.

⚠️ This feature can only be used by logged in users.

Code Indentation


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.

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.

              <link href="https://fonts.googleapis.com/css?family=Raleway" rel="stylesheet">

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

<script src="https://cdnjs.cloudflare.com/ajax/libs/react/15.3.1/react.min.js"></script>

<script src="https://cdnjs.cloudflare.com/ajax/libs/react/15.3.1/react-dom.min.js"></script>

<script src="https://cdnjs.cloudflare.com/ajax/libs/marked/0.3.6/marked.js"></script>

<script src="https://cdn.freecodecamp.org/testable-projects-fcc/v1/bundle.js"></script>
              $lightBlue: #66ccff;
$brightBlue: #66ffff;
$lightGreen: #66ffcc;
$lightRed: #ff6666;

body {
  font-family: 'Raleway', sans-serif;
  background: $lightRed;
  padding: 0;
  margin: 0;
  box-sizing: border-box;

#wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;

img {
  height: 400px;

#editor, #preview {
  top: 7.5vh;
  border: 5px solid black;
  border-radius: 5px;
  background: white;
  padding: 30px;

#editor {
  position: fixed;
  left: 0;
  top: 0;
  margin: 5%;
  width: 30%;
  height: 70%;

#preview {
  position: absolute;
  right: 0;
  top: 0;
  margin: 5% 5% 5.5% 5%;
  width: 50%;

#preview code {
  display: block;
  background: #cccccc;
  border-radius: 2px;

ul li {
  margin: 10px;
//Makes it so that you don't need to hit return twice
//to get a new line. One return equals a <br>
  breaks: true,

class App extends React.Component {
  constructor(props) {
    this.state = {
      stuff: placeholder
    this.onChange = this.onChange.bind(this);
  onChange = (event) => {
        stuff: event.target.value 
  render() {
    return (
      <div id="wrapper">
        <Editor stuff={this.state.stuff} onChange={this.onChange} />
        <Preview stuff={this.state.stuff}/>
}; // ends class MarkdownApp

const Editor = (props) => {
  return (
    <textarea id="editor" value={props.stuff} onChange={props.onChange}>

const Preview = (props) => {
  return (
    <div id='preview' dangerouslySetInnerHTML={{__html: marked(props.stuff)}} />

const placeholder = 
# Use # to denote a header (h1)
## Use ## to denote sub-header (h2)
### Use [linkDisplay](linkURL) to denote a link: [Google](https://www.google.com)

Use --- for a horizontal row


# Here is a list

1. Roses are red
2. Violets are blue

- Please insert a coin
- And be player two

# Here is an unordered list

- Roses are red
- Violets are blue
- tl;dr
- They differ in hue

\`\`\`//This is single-lined code.\`\`\`

// This is multi-line code:

<form action="#" method="post">

    <label for="name">Text Input:</label>
    <input type="text" name="name" id="name" value="" tabindex="1" />

    <label for="textarea">Textarea:</label>
    <textarea cols="40" rows="8" name="textarea" id="textarea"></textarea>

    <input type="submit" value="Submit" />



# Here is an image
![React Logo](https://upload.wikimedia.org/wikipedia/commons/thumb/a/a7/React-icon.svg/2000px-React-icon.svg.png "React Logo Caption")

> # Here is a BLOCKQUOTE!
> Lorem ipsum dolor sit amet, consectetur adipiscing elit. Praesent lobortis, risus id gravida fermentum, dui leo malesuada felis, quis sollicitudin dolor massa non tellus. Etiam varius varius turpis vitae sodales. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Pellentesque auctor egestas orci. Aenean at justo consectetur, luctus mi vel, ornare dui. Vestibulum tempor malesuada fermentum. Cras congue lacus ac sem interdum posuere. Sed id sollicitudin risus.

*Hello there, italicized emphasis*

***This is italicized STRONG EMPHASIS***

****Four asterisks do nothing...****

ReactDOM.render(<App />, document.getElementById("container-fluid"));
🕑 One or more of the npm packages you are using needs to be built. You're the first person to ever need it! We're building it right now and your preview will start updating again when it's ready.