css Audio - Active file-generic CSS - Active Generic - Active HTML - Active JS - Active SVG - Active Text - Active file-generic Video - Active header Love html icon-new-collection icon-person icon-team numbered-list123 pop-out spinner split-screen star tv

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.

              <div style="padding:6px; text-align:center;">
		<input type="button" onClick="iBold(rtContent);" value="B" />
		<input type="button" onClick="iItalic(rtContent);" value="I" />
		<input type="button" onClick="iUnderline(rtContent);" value="U" />
		<input type="button" onClick="iFontSize(rtContent);" value="Font Size" />
		<input type="button" onClick="iFontColor(rtContent);" value="Font Color" />
		<input type="button" onClick="iLink(rtContent);" value="Link" />
		<input type="button" onClick="iUnLink(rtContent);" value="Remove Link" />
		<input type="button" onClick="iOrderedList(rtContent);" value="Numbered List" />
    <br />
		<input type="button" onClick="iUnorderedList(rtContent);" value="Bulleted List" />
		<input type="button" onClick="iImg(rtContent);" value="Insert Image" />
		<input type="button" onClick="iYouTube();" value="Embed YouTube" />
		<input type="button" onClick="iVimeo();" value="Embed Vimeo" />
		<input type="button" onClick="iGoogleDoc();" value="Embed GoogleDoc" />
  <br /><br />
  <form method="POST" action="classes.php?mode=new" name="contentForm" id="contentForm">
      <textarea style="display:none;" cols="75" rows="4" name="content" id="content"></textarea>
      <iframe name="rtContent" id="rtContent" class="rtContentBox"></iframe>
              /* edit page styling */
.rtContentBox {
	border: #999 1px solid;
	width: 100%;
	height: 200px;
input {
  padding: 6px;
  margin: 4px 8px 4px 0px;

function iFrameOn () {
	rtContent.document.designMode = 'On';
	if ( document.contains(document.getElementById("rtContent2")) ) {
	rtContent2.document.designMode = 'On';
function iBold (targetFrame) {
function iItalic (targetFrame) {
function iUnderline (targetFrame) {
function iUploadImg (url) {
	var win = window.open(url, '_blank');
function iImg (targetFrame) {
	var imgSrc = prompt('Enter the image\'s location URL. Use the "Upload Image" button to upload an image from your computer and then enter the URL it provides on the confirmation page.','http://');
	if ( imgSrc != null){
function iLink (targetFrame) {
	var linkURL = prompt('Enter the URL for this link:', 'http://');
	if ( linkURL != null){
function iUnLink (targetFrame) {
function iYouTube () {
	var youTubeLink = prompt('Enter the YouTube video URL. Make sure nothing is appended to it. For help on how to do this, see the support page.', 'http://');
	var youTubeEmbed = '[youtube]' + youTubeLink + '[/youtube]';
	window.frames['rtContent'].document.body.innerHTML = window.frames['rtContent'].document.body.innerHTML + youTubeEmbed;
function iVimeo () {
	var vimeoLink = prompt('Enter the Vimeo video URL.', 'http://');
	var vimeoEmbed = '[vimeo]' + vimeoLink + '[/vimeo]';
	window.frames['rtContent'].document.body.innerHTML = window.frames['rtContent'].document.body.innerHTML + vimeoEmbed;
function iGoogleDoc () {
	var googleDocLink = prompt('Enter the Google Doc Link.', 'https://');
	var googleDocEmbed = '[googledoc]' + googleDocLink + '[/googledoc]';
	window.frames['rtContent'].document.body.innerHTML = window.frames['rtContent'].document.body.innerHTML + googleDocEmbed;
function iFontSize (targetFrame) {
	var fSize = prompt('Enter a size, 1 - 7.', '');
function iFontColor (targetFrame) {
	var fColor = prompt('Enter a basic color or use a hexadecimal color code.', '');
function iUnorderedList (targetFrame) {
function iOrderedList (targetFrame) {
function submitForm () {
	var theForm = document.getElementById("contentForm");
	theForm.elements["content"].value = window.frames['rtContent'].document.body.innerHTML;
	if ( document.contains(theForm.elements["preview"]) ) {
	theForm.elements["preview"].value = window.frames['rtContent2'].document.body.innerHTML;
🕑 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.
Loading ..................