New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@tiptap/extension-typography

Package Overview
Dependencies
Maintainers
4
Versions
175
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@tiptap/extension-typography - npm Package Compare versions

Comparing version 2.3.2 to 2.4.0

30

dist/index.js

@@ -91,4 +91,34 @@ import { Extension, textInputRule } from '@tiptap/core';

});
/**
* This extension allows you to add typography replacements for specific characters.
* @see https://www.tiptap.dev/api/extensions/typography
*/
const Typography = Extension.create({
name: 'typography',
addOptions() {
return {
closeDoubleQuote: '”',
closeSingleQuote: '’',
copyright: '©',
ellipsis: '…',
emDash: '—',
laquo: '«',
leftArrow: '←',
multiplication: '×',
notEqual: '≠',
oneHalf: '½',
oneQuarter: '¼',
openDoubleQuote: '“',
openSingleQuote: '‘',
plusMinus: '±',
raquo: '»',
registeredTrademark: '®',
rightArrow: '→',
servicemark: '℠',
superscriptThree: '³',
superscriptTwo: '²',
threeQuarters: '¾',
trademark: '™',
};
},
addInputRules() {

@@ -95,0 +125,0 @@ const rules = [];

@@ -95,4 +95,34 @@ (function (global, factory) {

});
/**
* This extension allows you to add typography replacements for specific characters.
* @see https://www.tiptap.dev/api/extensions/typography
*/
const Typography = core.Extension.create({
name: 'typography',
addOptions() {
return {
closeDoubleQuote: '”',
closeSingleQuote: '’',
copyright: '©',
ellipsis: '…',
emDash: '—',
laquo: '«',
leftArrow: '←',
multiplication: '×',
notEqual: '≠',
oneHalf: '½',
oneQuarter: '¼',
openDoubleQuote: '“',
openSingleQuote: '‘',
plusMinus: '±',
raquo: '»',
registeredTrademark: '®',
rightArrow: '→',
servicemark: '℠',
superscriptThree: '³',
superscriptTwo: '²',
threeQuarters: '¾',
trademark: '™',
};
},
addInputRules() {

@@ -99,0 +129,0 @@ const rules = [];

import { Extension } from '@tiptap/core';
export interface TypographyOptions {
/**
* The em dash character.
* @default '—'
*/
emDash: false | string;
/**
* The ellipsis character.
* @default '…'
*/
ellipsis: false | string;
/**
* The open double quote character.
* @default '“'
*/
openDoubleQuote: false | string;
/**
* The close double quote character.
* @default '”'
*/
closeDoubleQuote: false | string;
/**
* The open single quote character.
* @default '‘'
*/
openSingleQuote: false | string;
/**
* The close single quote character.
* @default '’'
*/
closeSingleQuote: false | string;
/**
* The left arrow character.
* @default '←'
*/
leftArrow: false | string;
/**
* The right arrow character.
* @default '→'
*/
rightArrow: false | string;
/**
* The copyright character.
* @default '©'
*/
copyright: false | string;
/**
* The trademark character.
* @default '™'
*/
trademark: false | string;
/**
* The servicemark character.
* @default '℠'
*/
servicemark: false | string;
/**
* The registered trademark character.
* @default '®'
*/
registeredTrademark: false | string;
/**
* The one half character.
* @default '½'
*/
oneHalf: false | string;
/**
* The plus minus character.
* @default '±'
*/
plusMinus: false | string;
/**
* The not equal character.
* @default '≠'
*/
notEqual: false | string;
/**
* The laquo character.
* @default '«'
*/
laquo: false | string;
/**
* The raquo character.
* @default '»'
*/
raquo: false | string;
/**
* The multiplication character.
* @default '×'
*/
multiplication: false | string;
/**
* The superscript two character.
* @default '²'
*/
superscriptTwo: false | string;
/**
* The superscript three character.
* @default '³'
*/
superscriptThree: false | string;
/**
* The one quarter character.
* @default '¼'
*/
oneQuarter: false | string;
/**
* The three quarters character.
* @default '¾'
*/
threeQuarters: false | string;

@@ -48,2 +136,6 @@ }

export declare const threeQuarters: (override?: string) => import("@tiptap/core").InputRule;
/**
* This extension allows you to add typography replacements for specific characters.
* @see https://www.tiptap.dev/api/extensions/typography
*/
export declare const Typography: Extension<TypographyOptions, any>;

4

package.json
{
"name": "@tiptap/extension-typography",
"description": "typography extension for tiptap",
"version": "2.3.2",
"version": "2.4.0",
"homepage": "https://tiptap.dev",

@@ -32,3 +32,3 @@ "keywords": [

"devDependencies": {
"@tiptap/core": "^2.3.2"
"@tiptap/core": "^2.4.0"
},

@@ -35,0 +35,0 @@ "peerDependencies": {

import { Extension, textInputRule } from '@tiptap/core'
export interface TypographyOptions {
/**
* The em dash character.
* @default '—'
*/
emDash: false | string,
/**
* The ellipsis character.
* @default '…'
*/
ellipsis: false | string,
/**
* The open double quote character.
* @default '“'
*/
openDoubleQuote: false | string,
/**
* The close double quote character.
* @default '”'
*/
closeDoubleQuote: false | string,
/**
* The open single quote character.
* @default '‘'
*/
openSingleQuote: false | string,
/**
* The close single quote character.
* @default '’'
*/
closeSingleQuote: false | string,
/**
* The left arrow character.
* @default '←'
*/
leftArrow: false | string,
/**
* The right arrow character.
* @default '→'
*/
rightArrow: false | string,
/**
* The copyright character.
* @default '©'
*/
copyright: false | string,
/**
* The trademark character.
* @default '™'
*/
trademark: false | string,
/**
* The servicemark character.
* @default '℠'
*/
servicemark: false | string,
/**
* The registered trademark character.
* @default '®'
*/
registeredTrademark: false | string,
/**
* The one half character.
* @default '½'
*/
oneHalf: false | string,
/**
* The plus minus character.
* @default '±'
*/
plusMinus: false | string,
/**
* The not equal character.
* @default '≠'
*/
notEqual: false | string,
/**
* The laquo character.
* @default '«'
*/
laquo: false | string,
/**
* The raquo character.
* @default '»'
*/
raquo: false | string,
/**
* The multiplication character.
* @default '×'
*/
multiplication: false | string,
/**
* The superscript two character.
* @default '²'
*/
superscriptTwo: false | string,
/**
* The superscript three character.
* @default '³'
*/
superscriptThree: false | string,
/**
* The one quarter character.
* @default '¼'
*/
oneQuarter: false | string,
/**
* The three quarters character.
* @default '¾'
*/
threeQuarters: false | string,

@@ -138,5 +247,36 @@ }

/**
* This extension allows you to add typography replacements for specific characters.
* @see https://www.tiptap.dev/api/extensions/typography
*/
export const Typography = Extension.create<TypographyOptions>({
name: 'typography',
addOptions() {
return {
closeDoubleQuote: '”',
closeSingleQuote: '’',
copyright: '©',
ellipsis: '…',
emDash: '—',
laquo: '«',
leftArrow: '←',
multiplication: '×',
notEqual: '≠',
oneHalf: '½',
oneQuarter: '¼',
openDoubleQuote: '“',
openSingleQuote: '‘',
plusMinus: '±',
raquo: '»',
registeredTrademark: '®',
rightArrow: '→',
servicemark: '℠',
superscriptThree: '³',
superscriptTwo: '²',
threeQuarters: '¾',
trademark: '™',
}
},
addInputRules() {

@@ -143,0 +283,0 @@ const rules = []

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc