New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@tiptap/extension-highlight

Package Overview
Dependencies
Maintainers
6
Versions
188
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@tiptap/extension-highlight

highlight extension for tiptap

2.11.5
latest
Source
npm
Version published
Weekly downloads
418K
-14.74%
Maintainers
6
Weekly downloads
 
Created

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

Keywords

tiptap

FAQs

Package last updated on 31 Jan 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts