Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@tiptap/extension-underline

Package Overview
Dependencies
Maintainers
5
Versions
169
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@tiptap/extension-underline

underline extension for tiptap

  • 2.10.3
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
490K
decreased by-19.88%
Maintainers
5
Weekly downloads
 
Created

What is @tiptap/extension-underline?

@tiptap/extension-underline is an extension for the Tiptap editor that allows you to add underline formatting to your text. It integrates seamlessly with Tiptap's modular architecture, enabling you to easily add underline functionality to your rich text editor.

What are @tiptap/extension-underline's main functionalities?

Add Underline Extension

This code demonstrates how to add the Underline extension to a Tiptap editor instance. The Underline extension is imported and included in the editor's extensions array.

import Underline from '@tiptap/extension-underline';
import { Editor } from '@tiptap/core';

const editor = new Editor({
  extensions: [
    Underline,
  ],
  content: '<p>Hello World!</p>',
});

Toggle Underline

This code shows how to programmatically toggle the underline formatting on the selected text in the editor. The `toggleUnderline` method is chained with other editor commands.

editor.chain().focus().toggleUnderline().run();

Check Underline State

This code snippet checks if the current selection in the editor is underlined. The `isActive` method returns a boolean indicating the underline state.

const isUnderlined = editor.isActive('underline');

Other packages similar to @tiptap/extension-underline

Keywords

FAQs

Package last updated on 26 Nov 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