Skip to content

Line Height

The Line Height extension allows you to change the line height of your text.

Usage

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

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

Options

lineHeights

Type: string[]
Default: ['100%', '115%', '150%', '200%', '250%', '300%']

js
import { DEFAULT_LINE_HEIGHT_LIST, LineHeight } from 'reactjs-tiptap-editor'

FontSize.configure({
  LineHeight: [
    // Use default line height list
    ...DEFAULT_LINE_HEIGHT_LIST,
    '1',
    '1.5',
    '2',
    '2.5'
  ]
})

Source

SourceDocs

Contributors

Changelog

v0.0.10 on 8/19/2024
d832e - docs(LineHeight): add options docs

Made with ❤️