Search

Typography

VersionDownloads

This extension tries to help with common text patterns with the correct typographic character. Under the hood all rules are input rules.

Installation

# with npm
npm install @tiptap/extension-typography

# with Yarn
yarn add @tiptap/extension-typography

Rules

NameDescription
emDashConverts double dashes -- to an emdash .
ellipsisConverts three dots ... to an ellipsis character
openDoubleQuoteSmart” opening double quotes.
closeDoubleQuote“Smart closing double quotes.
openSingleQuoteSmart’ opening single quotes.
closeSingleQuote‘Smart closing single quotes.
leftArrowConverts <‐ to an arrow .
rightArrowConverts ‐> to an arrow .
copyrightConverts (c) to a copyright sign ©.
registeredTrademarkConverts (r) to registered trademark sign ®.
oneHalfConverts 1/2 to one half ½.
plusMinusConverts +/- to plus/minus sign ±.
notEqualConverts != to a not equal sign .
laquoConverts << to left-pointing double angle quotation mark «.
raquoConverts >> to right-pointing double angle quotation mark ».
multiplicationConverts 2 * 3 or 2x3 to a multiplcation sign 2×3.

Keyboard shortcuts

  • Backspace reverts the applied input rule

Source code

packages/extension-typography/

Usage