Features/Designer

Rich text element

A block based text editor element for long form content with headings, lists, quotes, images, tables, code and embeds.

The Rich Text element holds formatted content edited in a block editor (Editor.js) inside a modal. It is meant for content like articles, terms pages or long descriptions where styling each paragraph as a separate element would be too much work. The content is stored as structured blocks and rendered to HTML on the page inside a wrapper with the class dh-rich-text, so you can style its children from the Designer.

How it works

  • Add from the element toolbar (Embed group) or Explorer; double click to edit, the editor opens in a 920px modal with a Save button.
  • Block types: Header, Paragraph, List (nested, default unordered), Quote, Delimiter, Image, Code, Table, Raw HTML, Embed (YouTube, Vimeo, Twitch video).
  • Inline tools: bold, italic, underline, hyperlink (CMD+L; target _blank or _self; rel nofollow, noopener, noreferrer, author), inline style tool.
  • Block tunes: alignment, alert variant on paragraphs.
  • Images upload to Divhunt storage by file or by URL.
  • Stored as a JSON array of blocks; rendered to HTML with the editorjs.html library at runtime.
  • If the element text is bound to dynamic (CMS) content, the editor refuses to open with 'Rich text is connected with dynamic content.'
  • Output wrapper: <div class="dh-rich-text ...">.

When to use it

  • Write a privacy policy page
  • Add a long product description with lists and images
  • Embed a YouTube video inside an article body

Limitations

  • Cannot be edited in the modal when bound to a CMS field
  • Invalid stored data renders the text 'Invalid rich-text data.'

Availability

  • Works in Designer.
  • Included in every plan.

How to use it.

  1. Add a Rich Text element
  2. Double click it to open the editor
  3. Write content with the block tools
  4. Click Save

Questions.

Can I style the rich text content?

Which embeds are supported?

Related features.

No card needed

Build it today.Pay when it goes live.

Every feature is unmetered while you build. Checkout opens the first time you publish.