Research
Security News
Malicious npm Package Targets Solana Developers and Hijacks Funds
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
@tiptap/starter-kit
Advanced tools
@tiptap/starter-kit is a comprehensive toolkit for building rich text editors with Tiptap, a headless, framework-agnostic text editor built on ProseMirror. It provides a set of pre-configured extensions and features to quickly set up a functional and customizable text editor.
Basic Setup
This code sets up a basic Tiptap editor with the StarterKit extension, which includes essential features like bold, italic, and paragraph formatting.
import { Editor } from '@tiptap/core';
import StarterKit from '@tiptap/starter-kit';
const editor = new Editor({
element: document.querySelector('#editor'),
extensions: [StarterKit],
});
Custom Extensions
This example demonstrates how to add custom extensions to the Tiptap editor alongside the StarterKit, allowing for extended functionality.
import { Editor } from '@tiptap/core';
import StarterKit from '@tiptap/starter-kit';
import CustomExtension from './CustomExtension';
const editor = new Editor({
element: document.querySelector('#editor'),
extensions: [StarterKit, CustomExtension],
});
Event Handling
This code snippet shows how to handle events in the Tiptap editor, such as logging the updated content whenever the editor's content changes.
import { Editor } from '@tiptap/core';
import StarterKit from '@tiptap/starter-kit';
const editor = new Editor({
element: document.querySelector('#editor'),
extensions: [StarterKit],
onUpdate: ({ editor }) => {
console.log('Content updated:', editor.getHTML());
},
});
Quill is a powerful, free, open-source WYSIWYG editor built for the modern web. It offers a rich API and a modular architecture, making it highly customizable. Compared to @tiptap/starter-kit, Quill is more opinionated and comes with a default UI, whereas Tiptap is headless and more flexible.
Slate is a completely customizable framework for building rich text editors. It provides a set of tools to create complex editors with a focus on extensibility and control over the rendering process. Unlike @tiptap/starter-kit, Slate requires more setup and configuration but offers greater flexibility in terms of customization.
Draft.js is a JavaScript rich text editor framework, built and maintained by Facebook. It provides a set of React components and an immutable model for managing editor state. Draft.js is similar to @tiptap/starter-kit in terms of providing a robust foundation for building text editors, but it is more tightly coupled with React.
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
starter kit for tiptap
The npm package @tiptap/starter-kit receives a total of 672,746 weekly downloads. As such, @tiptap/starter-kit popularity was classified as popular.
We found that @tiptap/starter-kit 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.
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.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.