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

@tiptap/extension-bold

Package Overview
Dependencies
Maintainers
5
Versions
165
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@tiptap/extension-bold

bold extension for tiptap

  • 2.7.1
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
850K
decreased by-15.5%
Maintainers
5
Weekly downloads
 
Created

What is @tiptap/extension-bold?

@tiptap/extension-bold is an extension for the Tiptap editor that allows you to add bold formatting to your text. It provides a simple way to toggle bold styling on and off within the Tiptap rich-text editor.

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

Add Bold Formatting

This code demonstrates how to add the Bold extension to a Tiptap editor instance. The Bold extension is imported and included in the editor's extensions array, enabling bold formatting in the editor.

import { Bold } from '@tiptap/extension-bold';
import { Editor } from '@tiptap/core';

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

Toggle Bold Formatting

This code shows how to programmatically toggle bold formatting on the selected text in the Tiptap editor. The `toggleBold` command is chained with `focus` to ensure the editor is focused before applying the bold formatting.

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

Other packages similar to @tiptap/extension-bold

Keywords

FAQs

Package last updated on 17 Sep 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