Security News
Research
Data Theft Repackaged: A Case Study in Malicious Wrapper Packages on npm
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
@tiptap/extension-color
Advanced tools
@tiptap/extension-color is an extension for the Tiptap editor that allows users to apply color to text. It provides a straightforward way to add color functionality to your Tiptap editor setup, enabling users to change the text color through a user-friendly interface.
Add Color to Text
This feature allows you to add color to text within the Tiptap editor. The code sample demonstrates how to configure the Color extension and apply a red color to the text.
import { Color } from '@tiptap/extension-color';
import { Editor } from '@tiptap/core';
const editor = new Editor({
extensions: [
Color.configure({ types: ['textStyle'] }),
],
content: '<p>Hello World!</p>',
});
editor.chain().focus().setColor('#ff0000').run();
Remove Color from Text
This feature allows you to remove color from text within the Tiptap editor. The code sample demonstrates how to configure the Color extension and remove the color from the text.
import { Color } from '@tiptap/extension-color';
import { Editor } from '@tiptap/core';
const editor = new Editor({
extensions: [
Color.configure({ types: ['textStyle'] }),
],
content: '<p style="color: #ff0000;">Hello World!</p>',
});
editor.chain().focus().unsetColor().run();
Quill is a powerful, rich text editor that provides extensive formatting options, including text color. It offers a more comprehensive set of features compared to @tiptap/extension-color, but it may be more complex to integrate if you only need basic color functionality.
Draft.js is a framework for building rich text editors in React. It includes support for text color and other formatting options. While it is highly customizable, it requires more setup and configuration compared to @tiptap/extension-color.
Slate is another rich text editor framework for React that supports text color and other formatting options. It is highly flexible and customizable, but it has a steeper learning curve compared to @tiptap/extension-color.
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
text color extension for tiptap
The npm package @tiptap/extension-color receives a total of 189,967 weekly downloads. As such, @tiptap/extension-color popularity was classified as popular.
We found that @tiptap/extension-color 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
Research
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
Research
Security News
Attackers used a malicious npm package typosquatting a popular ESLint plugin to steal sensitive data, execute commands, and exploit developer systems.
Security News
The Ultralytics' PyPI Package was compromised four times in one weekend through GitHub Actions cache poisoning and failure to rotate previously compromised API tokens.