Security News
JSR Working Group Kicks Off with Ambitious Roadmap and Plans for Open Governance
At its inaugural meeting, the JSR Working Group outlined plans for an open governance model and a roadmap to enhance JavaScript package management.
@tiptap/extension-list-item
Advanced tools
@tiptap/extension-list-item is an extension for the Tiptap editor that provides functionality for working with list items. It allows you to create, manipulate, and manage list items within your rich text editor, supporting both ordered and unordered lists.
Creating List Items
This code demonstrates how to include the ListItem extension in a Tiptap editor instance, enabling the creation of list items.
import { ListItem } from '@tiptap/extension-list-item';
const editor = new Editor({
extensions: [
ListItem,
],
});
Nested List Items
This code shows how to initialize the editor with nested list items, demonstrating the extension's capability to handle nested lists.
import { ListItem } from '@tiptap/extension-list-item';
const editor = new Editor({
extensions: [
ListItem,
],
content: '<ul><li>Item 1<ul><li>Nested Item 1</li></ul></li></ul>',
});
Toggling List Items
This code snippet demonstrates how to toggle a list item using the chainable commands provided by Tiptap.
import { ListItem } from '@tiptap/extension-list-item';
const editor = new Editor({
extensions: [
ListItem,
],
});
// Toggle a list item
editor.chain().focus().toggleListItem().run();
prosemirror-schema-list is a ProseMirror schema extension that provides list item functionality similar to @tiptap/extension-list-item. It allows for the creation and manipulation of ordered and unordered lists within a ProseMirror editor. While it offers similar core functionalities, it requires more manual setup compared to the seamless integration provided by Tiptap extensions.
draft-js-list-plugin is a plugin for Draft.js that adds support for list items. It allows users to create and manage ordered and unordered lists within a Draft.js editor. Compared to @tiptap/extension-list-item, it is specific to Draft.js and may require additional configuration to achieve similar functionality.
quill-better-table is a Quill.js module that enhances table functionality, including support for list items within table cells. While it is not solely focused on list items, it provides similar list management capabilities within the context of tables. It is more specialized compared to the general list item support offered by @tiptap/extension-list-item.
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
list item extension for tiptap
The npm package @tiptap/extension-list-item receives a total of 794,699 weekly downloads. As such, @tiptap/extension-list-item popularity was classified as popular.
We found that @tiptap/extension-list-item 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
At its inaugural meeting, the JSR Working Group outlined plans for an open governance model and a roadmap to enhance JavaScript package management.
Security News
Research
An advanced npm supply chain attack is leveraging Ethereum smart contracts for decentralized, persistent malware control, evading traditional defenses.
Security News
Research
Attackers are impersonating Sindre Sorhus on npm with a fake 'chalk-node' package containing a malicious backdoor to compromise developers' projects.