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

@tiptap/extension-font-family

Package Overview
Dependencies
Maintainers
6
Versions
175
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@tiptap/extension-font-family - npm Package Compare versions

Comparing version 3.0.0-next.3 to 3.0.0-next.4

LICENSE.md

36

dist/index.d.ts

@@ -1,34 +0,2 @@

import { Extension } from '@tiptap/core';
type FontFamilyOptions = {
/**
* A list of node names where the font family can be applied.
* @default ['textStyle']
* @example ['heading', 'paragraph']
*/
types: string[];
};
declare module '@tiptap/core' {
interface Commands<ReturnType> {
fontFamily: {
/**
* Set the font family
* @param fontFamily The font family
* @example editor.commands.setFontFamily('Arial')
*/
setFontFamily: (fontFamily: string) => ReturnType;
/**
* Unset the font family
* @example editor.commands.unsetFontFamily()
*/
unsetFontFamily: () => ReturnType;
};
}
}
/**
* This extension allows you to set a font family for text.
* @see https://www.tiptap.dev/api/extensions/font-family
*/
declare const FontFamily: Extension<FontFamilyOptions, any>;
export { FontFamily, type FontFamilyOptions, FontFamily as default };
import { FontFamily } from '@tiptap/extension-text-style';
export { FontFamily, FontFamilyOptions, FontFamily as default } from '@tiptap/extension-text-style';

@@ -1,50 +0,9 @@

// src/font-family.ts
import "@tiptap/extension-text-style";
import { Extension } from "@tiptap/core";
var FontFamily = Extension.create({
name: "fontFamily",
addOptions() {
return {
types: ["textStyle"]
};
},
addGlobalAttributes() {
return [
{
types: this.options.types,
attributes: {
fontFamily: {
default: null,
parseHTML: (element) => element.style.fontFamily,
renderHTML: (attributes) => {
if (!attributes.fontFamily) {
return {};
}
return {
style: `font-family: ${attributes.fontFamily}`
};
}
}
}
}
];
},
addCommands() {
return {
setFontFamily: (fontFamily) => ({ chain }) => {
return chain().setMark("textStyle", { fontFamily }).run();
},
unsetFontFamily: () => ({ chain }) => {
return chain().setMark("textStyle", { fontFamily: null }).removeEmptyTextStyle().run();
}
};
}
});
// src/index.ts
var src_default = FontFamily;
import { FontFamily, FontFamilyOptions } from "@tiptap/extension-text-style";
var index_default = FontFamily;
export {
FontFamily,
src_default as default
FontFamilyOptions,
index_default as default
};
//# sourceMappingURL=index.js.map
{
"name": "@tiptap/extension-font-family",
"description": "font family extension for tiptap",
"version": "3.0.0-next.3",
"version": "3.0.0-next.4",
"homepage": "https://tiptap.dev",

@@ -18,3 +18,6 @@ "keywords": [

".": {
"types": "./dist/index.d.ts",
"types": {
"import": "./dist/index.d.ts",
"require": "./dist/index.d.cts"
},
"import": "./dist/index.js",

@@ -32,8 +35,6 @@ "require": "./dist/index.cjs"

"devDependencies": {
"@tiptap/core": "^3.0.0-next.3",
"@tiptap/extension-text-style": "^3.0.0-next.3"
"@tiptap/extension-text-style": "^3.0.0-next.4"
},
"peerDependencies": {
"@tiptap/core": "^3.0.0-next.1",
"@tiptap/extension-text-style": "^3.0.0-next.1"
"@tiptap/extension-text-style": "^3.0.0-next.3"
},

@@ -46,4 +47,5 @@ "repository": {

"scripts": {
"build": "tsup"
"build": "tsup",
"lint": "prettier ./src/ --check && eslint --cache --quiet --no-error-on-unmatched-pattern ./src/"
}
}
}
# @tiptap/extension-font-family
[![Version](https://img.shields.io/npm/v/@tiptap/extension-font-family.svg?label=version)](https://www.npmjs.com/package/@tiptap/extension-font-family)

@@ -8,8 +9,11 @@ [![Downloads](https://img.shields.io/npm/dm/@tiptap/extension-font-family.svg)](https://npmcharts.com/compare/tiptap?minimal=true)

## Introduction
Tiptap is a headless wrapper around [ProseMirror](https://ProseMirror.net) – 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*.
Tiptap is a headless wrapper around [ProseMirror](https://ProseMirror.net) – 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_.
## Official Documentation
Documentation can be found on the [Tiptap website](https://tiptap.dev).
## License
Tiptap is open sourced software licensed under the [MIT license](https://github.com/ueberdosis/tiptap/blob/main/LICENSE.md).

@@ -1,5 +0,5 @@

import { FontFamily } from './font-family.js'
import { FontFamily, FontFamilyOptions } from '@tiptap/extension-text-style'
export * from './font-family.js'
export { FontFamily, FontFamilyOptions }
export default FontFamily

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