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

@tiptap/extension-placeholder

Package Overview
Dependencies
Maintainers
5
Versions
180
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@tiptap/extension-placeholder

placeholder extension for tiptap

  • 2.10.3
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
596K
decreased by-8.52%
Maintainers
5
Weekly downloads
 
Created

What is @tiptap/extension-placeholder?

@tiptap/extension-placeholder is an extension for the Tiptap editor that allows you to add placeholder text to your editor. This can be useful for providing users with guidance on what to input in the editor.

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

Basic Placeholder

This feature allows you to add a basic placeholder text to the editor. The placeholder text will be displayed when the editor is empty.

{"import":"import Placeholder from '@tiptap/extension-placeholder';","usage":"const editor = new Editor({\n  extensions: [\n    Placeholder.configure({\n      placeholder: 'Start typing here...',\n    }),\n  ],\n});"}

Dynamic Placeholder

This feature allows you to set dynamic placeholder text based on the node type. For example, you can have different placeholder texts for headings and paragraphs.

{"import":"import Placeholder from '@tiptap/extension-placeholder';","usage":"const editor = new Editor({\n  extensions: [\n    Placeholder.configure({\n      placeholder: ({ node }) => {\n        if (node.type.name === 'heading') {\n          return 'Enter a heading';\n        }\n        return 'Start typing here...';\n      },\n    }),\n  ],\n});"}

Custom Placeholder Styles

This feature allows you to apply custom styles to the placeholder text by specifying a CSS class.

{"import":"import Placeholder from '@tiptap/extension-placeholder';","usage":"const editor = new Editor({\n  extensions: [\n    Placeholder.configure({\n      placeholder: 'Start typing here...',\n      emptyEditorClass: 'my-custom-placeholder',\n    }),\n  ],\n});"}

Other packages similar to @tiptap/extension-placeholder

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