What is @tiptap/extension-highlight?
@tiptap/extension-highlight is an extension for the Tiptap editor that allows users to highlight text. It provides a simple way to add and manage text highlights within the Tiptap rich-text editor.
What are @tiptap/extension-highlight's main functionalities?
Basic Highlighting
This feature allows you to add basic text highlighting to your Tiptap editor. The code sample demonstrates how to import the Highlight extension and use it within the Tiptap editor.
import { Highlight } from '@tiptap/extension-highlight';
import { Editor } from '@tiptap/core';
const editor = new Editor({
extensions: [
Highlight,
],
content: '<p>Highlight <mark>this text</mark>!</p>',
});
Custom Highlight Color
This feature allows you to configure the Highlight extension to support multiple colors. The code sample shows how to enable multicolor highlighting and apply a custom background color to the highlighted text.
import { Highlight } from '@tiptap/extension-highlight';
import { Editor } from '@tiptap/core';
const editor = new Editor({
extensions: [
Highlight.configure({
multicolor: true,
}),
],
content: '<p>Highlight <mark style="background-color: yellow;">this text</mark> with custom color!</p>',
});
Other packages similar to @tiptap/extension-highlight
quill
Quill is a powerful, free, open-source WYSIWYG editor with a rich API. It supports text highlighting through its built-in formats and allows for extensive customization. Compared to @tiptap/extension-highlight, Quill offers a more comprehensive editor with a broader range of features but may require more setup for specific use cases.
draft-js
Draft.js is a framework for building rich text editors in React, developed by Facebook. It provides extensive customization options, including text highlighting. While Draft.js offers more control over the editor's behavior and appearance, it can be more complex to implement compared to the straightforward setup of @tiptap/extension-highlight.
prosemirror
ProseMirror is a toolkit for building rich-text editors with a focus on extensibility and performance. It allows for custom text highlighting through its schema and plugins. ProseMirror provides a high level of customization and control, similar to Tiptap, but may require more in-depth knowledge to implement effectively.
@tiptap/extension-highlight

Introduction
Tiptap is a headless wrapper around ProseMirror – a toolkit for building rich text WYSIWYG editors, which is already in use at many well-known companies such as New York Times, The Guardian or Atlassian.
Official Documentation
Documentation can be found on the Tiptap website.
License
Tiptap is open sourced software licensed under the MIT license.