Security News
Supply Chain Attack Detected in Solana's web3.js Library
A supply chain attack has been detected in versions 1.95.6 and 1.95.7 of the popular @solana/web3.js library.
@tiptap/extension-bold
Advanced tools
@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.
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();
The `prosemirror-example-setup` package provides a set of example configurations for ProseMirror, including bold formatting. It is more general-purpose and requires more setup compared to @tiptap/extension-bold, which is specifically designed for Tiptap.
Draft.js is a rich text editor framework for React that includes built-in support for bold formatting. It offers a more comprehensive solution for building rich text editors but may require more configuration and customization compared to the straightforward @tiptap/extension-bold.
Quill is a powerful, open-source WYSIWYG editor that supports bold formatting out of the box. It provides a more feature-rich editor experience but is a standalone editor, unlike @tiptap/extension-bold, which is an extension for the Tiptap editor.
Tiptap is a headless wrapper around ProseMirror – a toolkit for building rich text WYSIWYG editors, which is already in use at many well-known companies such as New York Times, The Guardian or Atlassian.
Documentation can be found on the Tiptap website.
Tiptap is open sourced software licensed under the MIT license.
FAQs
bold extension for tiptap
The npm package @tiptap/extension-bold receives a total of 916,344 weekly downloads. As such, @tiptap/extension-bold popularity was classified as popular.
We found that @tiptap/extension-bold demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 5 open source maintainers collaborating on the project.
Did you know?
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.
Security News
A supply chain attack has been detected in versions 1.95.6 and 1.95.7 of the popular @solana/web3.js library.
Research
Security News
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Security News
Research
Socket researchers have discovered malicious npm packages targeting crypto developers, stealing credentials and wallet data using spyware delivered through typosquats of popular cryptographic libraries.