Socket
Socket
Sign inDemoInstall

@tiptap/extension-bold

Package Overview
Dependencies
Maintainers
4
Versions
157
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


Version published
Weekly downloads
799K
decreased by-14.79%
Maintainers
4
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 29 Mar 2023

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc