What is @tiptap/extension-text?
@tiptap/extension-text is an extension for the Tiptap editor, which is a headless, framework-agnostic text editor built on ProseMirror. This extension provides basic text handling capabilities, allowing you to manage and manipulate text content within the Tiptap editor.
What are @tiptap/extension-text's main functionalities?
Basic Text Handling
This feature allows you to add basic text handling capabilities to your Tiptap editor instance. By including the Text extension, you can manage plain text content within the editor.
import { Text } from '@tiptap/extension-text';
const editor = new Editor({
extensions: [
Text,
],
});
Custom Text Configuration
This feature allows you to extend the default Text extension to include custom attributes or configurations. In this example, a custom attribute is added to the Text extension.
import { Text } from '@tiptap/extension-text';
const CustomText = Text.extend({
addAttributes() {
return {
customAttribute: {
default: null,
},
};
},
});
const editor = new Editor({
extensions: [
CustomText,
],
});
Other packages similar to @tiptap/extension-text
prosemirror-schema-basic
The prosemirror-schema-basic package provides a basic schema for ProseMirror, which includes nodes for paragraphs, headings, text, and more. It is similar to @tiptap/extension-text in that it provides basic text handling capabilities, but it is more focused on providing a complete schema for a basic editor setup.
draft-js
Draft.js is a framework for building rich text editors in React. It provides a set of immutable models and helper functions for managing text content. While it offers more advanced text handling and formatting capabilities compared to @tiptap/extension-text, it is specifically designed for use with React.
quill
Quill is a powerful, rich text editor built for the modern web. It provides a wide range of text formatting options and is highly customizable. Compared to @tiptap/extension-text, Quill offers a more comprehensive set of features out of the box, but it is a complete editor rather than an extension.
@tiptap/extension-text
Introduction
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.
Official Documentation
Documentation can be found on the Tiptap website.
License
Tiptap is open sourced software licensed under the MIT license.