Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: export type Level for external use #2354

Merged
merged 1 commit into from
Jan 5, 2022

Conversation

webri
Copy link
Contributor

@webri webri commented Jan 5, 2022

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` shall be of type `Level` and changes as part of other logic
this.editor.commands.toggleHeading({ level: this.selectedHeadingLevel })

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 })
```
@netlify
Copy link

netlify bot commented Jan 5, 2022

✔️ Deploy Preview for tiptap-embed ready!

🔨 Explore the source changes: 4d901d1

🔍 Inspect the deploy log: https://app.netlify.com/sites/tiptap-embed/deploys/61d54e7c16bfc70007e2b68d

😎 Browse the preview: https://deploy-preview-2354--tiptap-embed.netlify.app

@philippkuehn
Copy link
Contributor

Yeah. Let's do this.

@philippkuehn philippkuehn merged commit 77095c4 into ueberdosis:main Jan 5, 2022
@webri webri deleted the export-type-heading-level branch January 5, 2022 08:54
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants