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-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.
2.1.0-rc.14 (2023-08-11)
Note: Version bump only for package tiptap
FAQs
text color extension for tiptap
The npm package @tiptap/extension-color receives a total of 205,854 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
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.