We use cookies to ensure you get the best experience on our website. Read our privacy policy

Skip to main content

Directory

Rich Text Component

The RichText component provides a full-featured text editor powered by Quill.js. It offers rich text formatting capabilities, form integration, and customizable styling options.

  • Check Circle

    Rich Text Editing: Full text formatting capabilities

  • Check Circle

    Quill.js Integration: Industry-standard editor framework

  • Check Circle

    Form Integration: Seamless form compatibility

  • Check Circle

    Accessibility: ARIA support and keyboard navigation

Create a simple rich text editor:

<RichText class="h-48" />
RichText Component Props Extends <div> HTMLElement
Prop Type Default Description
label string Label text for the editor
subLabel string Secondary descriptive text
required boolean false Makes the field required
disabled boolean false Disables the editor
variant 'default' | 'underline' default Visual style variant
wrapperProps HTMLAttributes <div> Additional props for the wrapper

The RichText component exposes the Quill.js instance for programmatic control:

const editor = await ready(document.querySelector<RichTextElement>('rich-text'));
const quill = editor.quill;
// Set content
quill.setText('Hello, World!');
// Get content
const content = quill.getContents();
// Format text
quill.formatText(0, 5, 'bold', true);
  • Check Circle Set appropriate content limits
  • Check Circle Implement content validation
  • Check Circle Handle formatting restrictions
  • Check Circle Sanitize user input
Content Management Systems
Blog Post Editors
Comment Systems
Documentation Tools
Email Composers

Limited Time Launch Sale

Create professional content editing experiences with our pre-built RichText component. Get the AstroJS starter template now!

GET 60% OFF!
North Star Themes Logo

Subscribe to our newsletter

Get the latest AstroJS tips and tricks right to your inbox

Email: [email protected]

© 2025 North Star Themes

Web Kit Provided By North Star Themes