Back to all lessons
Lesson library

Rich text element overview

Use a Rich Text Element (RTE) to create long-form content.

 
This video features an old UI. Updated version coming soon!

A rich text element (RTE) is the perfect element for creating long-form content like blog posts, about pages, biographies — you name it. Instead of adding individual heading, paragraph, list, or image elements, you can double-click into a rich text element to create these different content elements directly.

The rich text element highlighted in the Add panel under Elements > Typography.

Rich text elements also make it easy for content editors to edit rich content within the Editor.

In this lesson, you’ll learn: 

  1. How to add a Rich text element to your site
  2. How to add and format text content
  3. How to add media content, custom code, and lists
  4. How to style content in a Rich text element

How to add a Rich text element to your site

You can add a Rich text element by dragging it from the Add panel (A) to the Designer canvas. To add or edit the content within, double-click the Rich text element or select the element and press Enter or Return on your keyboard.

You can add the following elements within Rich text elements: 

  • Paragraphs
  • Headings (H1-H6)
  • Images
  • Image captions
  • Image alt attributes
  • Custom code
  • Block quotes
  • Unordered lists (bulleted)
  • Ordered lists (numbered)
  • Videos (Youtube, Vimeo)
  • Rich media (Google maps, SoundCloud, Imgur, Giphy, Codepen, and more)

You can also add additional formatting to text elements:

  • Links (URL, page, email, etc.)
  • Bold text
  • Italic text
  • Superscript and subscript text

How to add and format text content

You can start typing inside the RTE and then add formatting to the text to create headings, block quotes, bold or italic text, and links.

How to add paragraphs

Just like any other text editor, pressing Enter on your keyboard will create a new paragraph on a new line where you can continue to type. To add multiple paragraphs, press Enter at the end of a paragraph.

How to add headings and block quotes

To create a heading, select any text inside of a paragraph and choose a heading (H1-H6) option.

Text within a rich text element is highlighted to apply an H2 heading.

The same goes for creating block quotes.

How to format text and add links

Any part of any text element (e.g., headings, paragraphs, captions, etc.) can be formatted with bold, italics, superscript, subscript, and links by selecting part of the text and applying your desired formatting options. Learn more about inline text formatting.

Text within a rich text element is highlighted to bold and italicize the text.

When you create a link within an RTE, you have the option to choose a URL, page, page section, email, or phone number.

Text within a rich text element is highlighted to apply a link that points to another page on the same site.

Keyboard shortcuts

These keyboard shortcuts can help you create your content a bit faster:

  • Shift + Space inserts a non-breaking space ( )
  • Shift + Enter inserts a line break (<br>)
  • Command + B (Control + B on Windows) makes text bold
  • Command + I (Control + I on Windows) italicizes text
  • Command + K (Control + K on Windows) lets you insert a hyperlink

How to add media content, custom code, and lists

When your text cursor is on a new line, a “plus button appears. Clicking this button reveals an insert menu with options to add images, videos, other rich media, custom code, and bulleted or numbered lists.

Add images, videos, and rich media

All media elements in the RTE are responsive and will respect the aspect ratio of the content. YouTube, Vimeo, and Dailymotion video support has been enhanced to allow custom start times. Here’s a list of some of the supported rich media types:

  • YouTube
  • Vimeo
  • Instagram post
  • Facebook post
  • DailyMotion
  • Kickstarter
  • TED
  • Wistia
  • Livestream
  • Twitch
  • Hulu
  • Imgur albums
  • Google maps
  • JSFiddle
  • Codepen
  • Scribd
  • SlideShare
  • Spotify playlists and charts
  • Giphy
  • SoundCloud
  • And more!

Media settings

Each media element can be sized using the presets in the image settings or sized to a specific pixel or percentage value by clicking the “wrench” icon in the toolbar. An optional caption can also be added below images.

An image of golden trees in a forest within a rich text element. The image settings are open to show that the image has been set to full width.

Alt text

To add alt text to your images, select the image you want to add alt text to, click the “wrench” icon in the toolbar, then type in your alt text. Learn more about writing descriptive alt text.

How to add custom code

The insert menu includes a button to add custom code.

The “custom code” button is highlighted in a rich text element’s insert menu.

You can use custom code to create tables and dividers with HTML, style parts of your rich text content with targeted CSS, expand your site’s functionality with JavaScript (like customized Google Maps or Google AdSense ads), and engage your audience with interactive third-party content (like embeds from Twitter, Soundcloud, Airtable, etc.).

Here’s how:

  1. Place your cursor where you’d like to add your custom code
  2. Click the “plus” icon to open the insert menu and click the custom code button
  3. Add your code 

How to add lists

The insert menu includes options to add unordered (bullet) and ordered (numbered) lists. 

The bullet and numbered list buttons are highlighted in a rich text element’s insert menu.

You can add a bullet list from the insert menu or by typing in a dash (-) followed by a space. 

To create numbered lists, you can use the insert menu or type an integer followed by a period and a space (e.g., 1. , 3. , 10. ). This is especially useful when you want to continue a numbered list after you’ve added some media between the list items – you can type the next number in the sequence, followed by a period and a space.

Rich text content from other sources

You can paste in rich text content from other sites or from a word processor like Google Docs. All formatting and links will be pasted within the rich text element. Images will also be imported on paste when pasting in a rich text element in the Designer or in a rich text field of a CMS item in the Collection manager detail view (both in the Designer and the Editor). 

Important: Images won’t be imported from rich content pasted in a rich text element in the Editor.

It’s important to keep in mind that pasting rich text content from other sources may also bring along unwanted formatting, like background color or hidden characters – so you may want to be mindful when pasting rich text from other sources. 

To ensure no unwanted formatting is pasted, you can first paste the rich text content into a plain text editor, then copy and paste into the Rich text element, or use the keyboard shortcut to paste unformatted text (Command + Shift + V on Mac, or Control + Shift + V on Windows). Keep in mind that this keyboard shortcut will strip the text of all formatting including bold, italics, and hyperlinks.

How to style content in a Rich text element

Styling the elements inside of a Rich text element works differently than styling other standalone elements, because text and media elements inside a Rich text element can be created or deleted by content editors at any time.

Basic styling

RTE elements inherit their styling from their respective HTML tags. The simplest way of styling elements in an RTE is by selecting the nested element and styling its tag.

If the RTE is activated — i.e., you’re typing or adding content inside the RTE –– you won’t be able to select the individual elements inside. To deactivate the RTE, press Escape. Then, you’ll be able to select the elements nested within the RTE to style them. 

To style an element nested in an RTE:

  1. Select the element within the RTE
  2. Click into the Selector field in the Style panel or press Command + Enter (Control + Enter on Windows)
  3. Select the tag (e.g., All paragraphs) from the menu
  4. Style the tag

This way, you’re editing the default styles for that element across the entire site. If you don’t want to style all elements on your site, check out Advanced styling below. Learn more about styling HTML tags.

Important: Deleting any element nested in a Rich text element will delete the whole Rich text element. To delete any of the RTE contents, activate the RTE by clicking inside the element, then select and delete the content.

Advanced styling

Adding a class to the Rich Text element will allow you to create unique text styles for that RTE instance. Please note that styling these nested tags will affect elements in any RTE with the same class applied, or any child elements of elements with the same class applied. Follow these steps:

  1. Select the RTE and give it a class
  2. Select any element inside of the RTE
  3. Go to the Style panel (S)
  4. Click into the Selector field
  5. Select the tag (e.g., All paragraphs) from the menu
  6. Click on Nest selector inside of “class name”
  7. Style the element
Note: Styling nested tags will affect any elements within elements with the same class applied, not just RTEs with the same class applied. If you’d like to create styles only for nested tags within RTEs with a specific class, we’d recommend creating a class specifically for RTEs, or using combo classes
The Selector field in the Style panel is focused and displays the option to select the All Paragraphs HTML tag.
The All Paragraphs HTML tag has been selected in the Selector field of the Style panel. The Selector field displays the option to nest the selector inside of the class of the currently selected element. 
The Selector field shows that styles will be applied to All Paragraphs when nested inside of an element that shares the currently selected class. 

How to style dynamic rich text

Rich text elements can be connected to rich text fields in a Collection. When an RTE is connected, it’s no longer possible to select or edit text elements, except for in the CMS, which serves as the source for the content in the RTE. 

To style a connected RTE, it’s recommended to disconnect (unbind) it from the rich text field, style the nested elements, and then re-connect (bind) it. If you just want to apply a class on a connected RTE, you can do that without disconnecting it. Learn more about dynamic rich texts.

Pro tip: You can create a Rich text element in a Style guide page to style the elements within the RTE without the need to connect and disconnect it from the CMS each time you’d like to make design changes. To do this, set the same class on the RTE in the Style guide as you have set on your Collection page. Now, whenever you need to update the style of the elements within the Rich text element on a Collection page, you can go to the Style guide page and style those elements in the corresponding RTE. 
Try Webflow — it's free