
Research
Two Malicious Rust Crates Impersonate Popular Logger to Steal Wallet Keys
Socket uncovers malicious Rust crates impersonating fast_log to steal Solana and Ethereum wallet keys from source code.
@tiptap/extension-text-align
Advanced tools
@tiptap/extension-text-align is an extension for the Tiptap editor that allows you to align text within your editor. It provides functionalities to align text to the left, center, right, or justify it. This extension is useful for creating rich text editors where text alignment is a necessary feature.
Align Text Left
This feature allows you to align text to the left. The code sample demonstrates how to configure the TextAlign extension to apply to headings and paragraphs, and then align the text to the left.
import { TextAlign } from '@tiptap/extension-text-align';
const editor = new Editor({
extensions: [
TextAlign.configure({
types: ['heading', 'paragraph'],
}),
],
});
editor.chain().focus().setTextAlign('left').run();
Align Text Center
This feature allows you to align text to the center. The code sample demonstrates how to configure the TextAlign extension to apply to headings and paragraphs, and then align the text to the center.
import { TextAlign } from '@tiptap/extension-text-align';
const editor = new Editor({
extensions: [
TextAlign.configure({
types: ['heading', 'paragraph'],
}),
],
});
editor.chain().focus().setTextAlign('center').run();
Align Text Right
This feature allows you to align text to the right. The code sample demonstrates how to configure the TextAlign extension to apply to headings and paragraphs, and then align the text to the right.
import { TextAlign } from '@tiptap/extension-text-align';
const editor = new Editor({
extensions: [
TextAlign.configure({
types: ['heading', 'paragraph'],
}),
],
});
editor.chain().focus().setTextAlign('right').run();
Justify Text
This feature allows you to justify text. The code sample demonstrates how to configure the TextAlign extension to apply to headings and paragraphs, and then justify the text.
import { TextAlign } from '@tiptap/extension-text-align';
const editor = new Editor({
extensions: [
TextAlign.configure({
types: ['heading', 'paragraph'],
}),
],
});
editor.chain().focus().setTextAlign('justify').run();
Quill is a powerful, free, open-source WYSIWYG editor with a rich API. It provides text alignment functionalities similar to @tiptap/extension-text-align, but it is a standalone editor rather than an extension.
Draft.js is a framework for building rich text editors in React. It offers text alignment features through its API, similar to @tiptap/extension-text-align, but it requires more setup and configuration.
Slate is a completely customizable framework for building rich text editors. It provides text alignment capabilities similar to @tiptap/extension-text-align, but it is more flexible and requires more manual configuration.
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 align extension for tiptap
The npm package @tiptap/extension-text-align receives a total of 686,476 weekly downloads. As such, @tiptap/extension-text-align popularity was classified as popular.
We found that @tiptap/extension-text-align 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
Socket uncovers malicious Rust crates impersonating fast_log to steal Solana and Ethereum wallet keys from source code.
Research
A malicious package uses a QR code as steganography in an innovative technique.
Research
/Security News
Socket identified 80 fake candidates targeting engineering roles, including suspected North Korean operators, exposing the new reality of hiring as a security function.