Pen Settings

HTML

CSS

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

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

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.

HTML

              
                <div class="w-container">
  <div class="c-rte w-richtext">
    <h2>Example Rich Text element</h2>
    <p>This code uses jQuery. Wrap the JS in a script block
and place in the Webflow page / template settings -> before body close.  Make sure you update the class selectors if you use something different.</p>
    <p><a href="/listing/accusantium-quis-facere-magnam">Internal Link in Empty Paragraph</a></p>
    <h4>Static and dynamic content editing</h4>
    <p>A rich text element can be used with static or dynamic content. For static content, just drop it into any page and begin editing. For dynamic content, add a rich text <a href="/listing/accusantium-quis-facere-magnam"> Internal Fake Link </a> field
      to any collection and then connect a rich text element to that field in the settings panel. Voila!</p>
    <h4>How to customize formatting for each rich text</h4>
    <p>Headings, paragraphs, blockquotes, figures, images, and figure captions <a href="https://www.duckduckgo.com"> External Link </a> can all be styled after a class is added to the rich text element using the "When inside of" nested selector system.</p>
  </div>
</div>
              
            
!

CSS

              
                /* Webflow default breakpoints */

@media screen and (max-width: 991px) {
/* Your responsive CSS */
}
@media screen and (max-width: 767px) {
/* Your responsive CSS */
}
@media screen and (max-width: 479px) {
/* Your responsive CSS */
}

/* style your button class in the designer */
.c-rte-button{
  font-weight: 400;
  color: #fff;
  text-decoration: none;  
  border-color: #007bff;
  display: inline-block;
  font-weight: 400;
  text-align: center;
  vertical-align: middle;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  background-color: #007bff;
  border: 1px solid transparent;
  padding: 0.375rem 0.75rem;
  font-size: 1rem;
  line-height: 1.5;
  border-radius: 0.25rem;
  transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}
.c-rte-button:hover{
  background-color: #4998ed;
}
              
            
!

JS

              
                $(".c-rte p").each(function() {
  var ptext = $(this)
    .clone()
    .children()
    .remove()
    .end()
    .text();

  if (ptext === "") {
    $(this)
      .find('a[href^="/"]')
      .addClass("c-rte-button");
  }
});
              
            
!
999px

Console