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 <weiland@bryter.io>
This commit is contained in:
@@ -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[],
|
||||
|
||||
Reference in New Issue
Block a user