Skip to content

Usage

tsx
import { FontFamily } from 'reactjs-tiptap-editor'; 

const extensions = [
  ...,
  // Import Extensions Here
  FontFamily 
];

Options

fontFamilyList

Type: (string | { value: string; name: string })[]

Set the font list, supporting two formats:

js
import { DEFAULT_FONT_FAMILY_LIST, FontFamily } from 'reactjs-tiptap-editor';

FontFamily.configure({ 
  fontFamilyList: [
    // Use default font list
    ...DEFAULT_FONT_FAMILY_LIST,
    // Two formats
    //   1. string
    //   2. { name: 'xxx', value: 'xxx' }

    '黑体',
    '楷体',
    { name: '仿宋', value: '仿宋' },
    'Arial',
    'Tahoma',
    'Verdana'
  ]
})

Source

SourceDocs

Contributors

Changelog

v0.0.10 on 8/19/2024
1b2c8 - feat(FontFamily): Add options support for FontFamily extension
v0.0.9 on 8/18/2024
d436d - feat: support dynamic rendering of bubble menu and remove bubble option

Made with ❤️