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. You can use the CSS from another Pen by using it's URL and the proper URL extention.

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


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.


                <div class="container">
	<div class="row">
		<div class="col-md-12 text-center">
			<h2 class="heading">Markdown Previewer</h2>
	<!-- This is where we will inject our content -->
	<div id="myMarkdown"></div>



                @import url('')

$background-color: #00bcd4
$text-color: #343435

	margin-top: 20px
	color: white
	font-family: 'Bitter', serif
	background: $background-color

	color: $text-color

	margin-bottom: 20px


                // Thanks to for his basic walk through of react
class Layout extends React.Component {
	// Constructor function to set the state of the component
	constructor(props) {
		this.state = {
			// Lets set some default markdown for our users
			markdown: 'Here are some example markdown options: \n#A Heading 1\n##A Heading 2\n###A Heading 3\n####A Heading 4\n#####A Heading 5'
	// Function to handle changes to the page
	updateMarkdown(event) {
		this.setState({ markdown: });
	// Create the markdown string to be injected into the view
		return { __html: marked(this.state.markdown) }
	// Render the component
		return (
			<div className="row">
				<div className="col-sm-6">
					<div className="panel panel-default">
						<div className="panel-heading"><h4>Markdown</h4></div>
						<div className="panel-body">
							<textarea onChange={this.updateMarkdown.bind(this)} value={this.state.markdown} className="form-control" rows="16"></textarea>
				<div className="col-sm-6">
					<div className="panel panel-default">
					<div className="panel-heading"><h4>Preview</h4></div>
						<div className="panel-body">
							<div dangerouslySetInnerHTML={this.createMarkdown(this.state.markdown)}></div>

// Send it all to the view
const Markdown = document.getElementById('myMarkdown');
ReactDOM.render(<Layout />, Markdown);