
Product
Introducing Socket Firewall: Free, Proactive Protection for Your Software Supply Chain
Socket Firewall is a free tool that blocks malicious packages at install time, giving developers proactive protection against rising supply chain attacks.
@tiptap/extension-blockquote
Advanced tools
@tiptap/extension-blockquote is an extension for the Tiptap editor that allows users to easily add and manage blockquotes within their rich text content. It provides a simple way to include blockquote formatting, making it easier to highlight quotes or important text in a visually distinct manner.
Adding a Blockquote
This code demonstrates how to add the Blockquote extension to a Tiptap editor instance and toggle a blockquote in the editor content.
import { Blockquote } from '@tiptap/extension-blockquote';
import { Editor } from '@tiptap/core';
const editor = new Editor({
extensions: [
Blockquote,
],
content: '<p>Hello World!</p>',
});
editor.chain().focus().toggleBlockquote().run();
Customizing Blockquote Styling
This code shows how to extend the Blockquote extension to add custom styling attributes and apply custom CSS to the blockquote element.
import { Blockquote } from '@tiptap/extension-blockquote';
import { Editor } from '@tiptap/core';
import { css } from 'styled-components';
const CustomBlockquote = Blockquote.extend({
addAttributes() {
return {
class: {
default: 'custom-blockquote',
},
};
},
});
const editor = new Editor({
extensions: [
CustomBlockquote,
],
content: '<p>Hello World!</p>',
});
const styles = css`
.custom-blockquote {
border-left: 4px solid #ccc;
padding-left: 16px;
color: #666;
}
`;
editor.chain().focus().toggleBlockquote().run();
The prosemirror-schema-basic package provides a basic schema for ProseMirror, including blockquote functionality. It is more low-level compared to @tiptap/extension-blockquote and requires more manual setup and configuration.
Quill is a rich text editor that includes built-in support for blockquotes. It provides a more comprehensive editor experience with a wide range of formatting options, including blockquotes, but may be more heavyweight compared to the focused functionality of @tiptap/extension-blockquote.
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.
v3.6.0
Improve typing and docs for EditorOptions.element
to reflect all supported mounting modes and align behavior across adapters.
element
now accepts:
Element
: the editor is appended inside the given element.{ mount: HTMLElement }
: the editor is mounted directly to mount
(no extra wrapper).(editorEl: HTMLElement) => void
: a function that receives the editor element so you can place it anywhere in the DOM.null
: no automatic mounting.Parse cell colwidth
from nearest <colgroup>
when missing on the cell
When importing HTML, table column widths are often declared on a surrounding <colgroup>
rather than on each <td>
. Previously, tableCell
only read the colwidth
attribute from the cell itself and would lose width information in that case. The implementation now falls back to reading the corresponding <col>
's width
from the table's <colgroup>
using the cell's index.
This is a non-breaking bugfix that preserves layout information when HTML uses <colgroup>
. Consider adding a small demo or unit test to assert colwidth is preserved for cells when only the <colgroup>
contains width attributes.
Fixes table wrapper replacement and lost selections when resizable: true
.
TableView.ignoreMutation now ignores attribute/childList/characterData mutations that occur inside the table wrapper but outside the editable contentDOM
, preventing wrapper re-creation during resize interactions so selections (e.g. mergeCells()
) are preserved.
No API or breaking changes.
Remove recently added updateBubbleMenuPosition
method because it would not work in the React and Vue versions of the BubbleMenu, only in the vanilla extension. And that would confuse developers.
Write the transactionHandler
method as an arrow function because arrow functions have no this
, so the this
remains the instance of the BubbleMenuView
class.
Create a utility to add unique IDs to a document in the server
The utility is called generateUniqueIds
and is exported from the @tiptap/extension-unique-id
package.
It has the same functionality as the UniqueID
extension, but without the need to create an Editor
instance. This lets you add unique IDs to the document in the server.
It takes the following parameters:
doc
: The Tiptap JSON document to add unique IDs to.extensions
: The extensions to use. Must include the UniqueID
extension.It returns the updated Tiptap JSON document, with the unique IDs added to the nodes.
attrs
through Vue 3 menusFAQs
blockquote extension for tiptap
The npm package @tiptap/extension-blockquote receives a total of 1,740,866 weekly downloads. As such, @tiptap/extension-blockquote popularity was classified as popular.
We found that @tiptap/extension-blockquote demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 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.
Product
Socket Firewall is a free tool that blocks malicious packages at install time, giving developers proactive protection against rising supply chain attacks.
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.