Pen Settings

HTML

CSS

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

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

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.

HTML

              
                <script src="https://unpkg.com/@lrnwebcomponents/deduping-fix@4.0.0/deduping-fix.js"></script>
<script type="module">
 import "https://unpkg.com/@lrnwebcomponents/enhanced-text/enhanced-text.js?module";
</script>
<h1>Example 1 with just vide effect</h1>
<div><button id="click">Click to vide enhance paragraph</button></div>
<enhanced-text vide>
            <p>This is the 6th time I have gotten to teach at the university and I hope that regardless of the bizarre times we live in that we'll be able to have fun and make the most of it learning a "new" technology called Web Components.</p>
          </enhanced-text>
<h1>Example 2 with remote Glossary loading</h1>
<enhanced-text auto haxcms-glossary haxcms-site-location="https://oer.hax.psu.edu/bto108/sites/edtechjoker/">This is what Coffee and coffee alone can do for the soul. As well as milk and Designing around the game Watchdogs.
          </enhanced-text>

<h1>Example 3 with remote Glossary loading + wikipedia related links + mark all instances</h1>
<enhanced-text auto wikipedia haxcms-mark-all haxcms-glossary haxcms-site-location="https://oer.hax.psu.edu/bto108/sites/edtechjoker/"><p>Look, I love coffee and no one loves coffee as much as I do. But some of my best friends are milk drinkers but milk that doesn't mean we're *laughs* milking an operation the scale of *looks around* WatchDogs. milk milk milk.... ok sometimes its like Watchdogs.</p>
  
</enhanced-text>
              
            
!

CSS

              
                p {
  margin: 10px;
  padding: 10px;
}

vocab-term {
 --vocab-term-color: orange;
}

simple-modal p {
  font-size: 20px;
    padding: 4px;
  margin: 8px;
}

simple-modal a {
  color: pink;
  font-size: 20px;
  background-color: blue;
}

enhanced-text {
  margin: 10px;
  padding: 10px;
  font-size: 22px;
}
enhanced-text[vide] {
  line-height: 1.6;
  font-size: 3.4em;
}
              
            
!

JS

              
                document.querySelector('#click').addEventListener("click", (e) => {
  // this is brue force enabling or you could set auto to true
  document.querySelector("enhanced-text[vide]").enhance();
})
              
            
!
999px

Console