Socket
Socket
Sign inDemoInstall

@tiptap/extension-highlight

Package Overview
Dependencies
Maintainers
5
Versions
166
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


Version published
Maintainers
5
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

FAQs

Package last updated on 15 Aug 2024

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc