1.1.1 • Published 10 months ago

tiptap-fontsize-extension v1.1.1

Weekly downloads
-
License
MIT
Repository
github
Last release
10 months ago

Tiptap Font-Size Extension

A Tiptap extension for adjusting font size in text editors.

Installation

You can install the extension via npm:

npm i tiptap-fontsize-extension

Usage

import { Editor } from '@tiptap/core';
import FontSize from 'tiptap-fontsize-extension';

const editor = new Editor({
  extensions: [
    FontSize.configure({
      defaultSize: '16px',
      step: 1
    }),
    // other extensions
  ],
});

Commands

  • setFontSize(size): Sets the font size to the specified value.
  • increaseFontSize(): Increases the font size by 1px.
  • decreaseFontSize(): Decreases the font size by 1px.
// Set font size to 20px
editor.commands.setFontSize('20px');

// Increase font size by 1px
editor.commands.increaseFontSize();

// Decrease font size by 1px
editor.commands.decreaseFontSize();

PRs are welcome 😃❤️

1.1.1

10 months ago

1.1.0

10 months ago

1.0.3

10 months ago

1.0.2

10 months ago

1.0.1

10 months ago

1.0.0

10 months ago