From 77095c4d52604b5c9d1d6cf748bb1110ea8cdd33 Mon Sep 17 00:00:00 2001 From: Britta Weiland Date: Wed, 5 Jan 2022 09:15:47 +0100 Subject: [PATCH] fix: export type `Level` for external use (#2354) Export type `Level` to externally work with levels that are passed to the `setHeading` and `toggleHeading` commands, instead of only being able to pass literal numbers. Example: ``` // where `selectedHeadingLevel` changes as part of other logic this.editor.commands.toggleHeading({ level: this.selectedHeadingLevel }) ``` Co-authored-by: Britta Weiland --- packages/extension-heading/src/heading.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/extension-heading/src/heading.ts b/packages/extension-heading/src/heading.ts index 53625d58..5a3c285f 100644 --- a/packages/extension-heading/src/heading.ts +++ b/packages/extension-heading/src/heading.ts @@ -1,6 +1,6 @@ import { Node, mergeAttributes, textblockTypeInputRule } from '@tiptap/core' -type Level = 1 | 2 | 3 | 4 | 5 | 6 +export type Level = 1 | 2 | 3 | 4 | 5 | 6 export interface HeadingOptions { levels: Level[],