Security News
GitHub Removes Malicious Pull Requests Targeting Open Source Repositories
GitHub removed 27 malicious pull requests attempting to inject harmful code across multiple open source repositories, in another round of low-effort attacks.
@tiptap/extension-heading
Advanced tools
@tiptap/extension-heading is an extension for the Tiptap text editor that allows you to add and manage heading elements in your rich text content. It provides a straightforward way to include headings of various levels (e.g., H1, H2, H3) in your editor, making it easier to structure and format your text.
Add Heading
This feature allows you to add heading elements to your Tiptap editor. You can configure which heading levels are available (e.g., H1, H2, H3).
const editor = new Editor({
extensions: [
Heading.configure({
levels: [1, 2, 3],
}),
],
})
Set Heading Level
This feature allows you to set the heading level for a selected text. In this example, the selected text is set to a level 2 heading (H2).
editor.chain().focus().toggleHeading({ level: 2 }).run()
Check Heading Level
This feature allows you to check if the current selection is a heading of a specific level. In this example, it checks if the selection is an H1 heading.
const isHeading = editor.isActive('heading', { level: 1 })
prosemirror-schema-basic provides a basic schema for ProseMirror, including heading nodes. It is more low-level compared to @tiptap/extension-heading and requires more manual setup.
draft-js is a rich text editor framework for React. It includes support for headings, but the API and configuration are different from Tiptap. It is more integrated with React and offers a different set of features.
quill is a modern WYSIWYG editor built for compatibility and extensibility. It supports headings out of the box and offers a different user experience and API compared to Tiptap.
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
heading extension for tiptap
The npm package @tiptap/extension-heading receives a total of 409,048 weekly downloads. As such, @tiptap/extension-heading popularity was classified as popular.
We found that @tiptap/extension-heading 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
GitHub removed 27 malicious pull requests attempting to inject harmful code across multiple open source repositories, in another round of low-effort attacks.
Security News
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.
Security News
Node.js will be enforcing stricter semver-major PR policies a month before major releases to enhance stability and ensure reliable release candidates.