refactor: export focusEvents plugin key (#6204)

* refactor(focus): export plugin key

* chore: changeset

* refactor: remove space

* refactor: extract focusEvents plugin key and export it

chore: changeset

revert: unwanted changes
This commit is contained in:
José Pereira 2025-03-27 20:56:54 +00:00 committed by GitHub
parent 9abb0190c5
commit 826cfe7406
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 9 additions and 2 deletions

View File

@ -0,0 +1,5 @@
---
"@tiptap/core": patch
---
Export focusEvents plugin key

View File

@ -2,6 +2,8 @@ import { Plugin, PluginKey } from '@tiptap/pm/state'
import { Extension } from '../Extension.js'
export const focusEventsPluginKey = new PluginKey('focusEvents')
export const FocusEvents = Extension.create({
name: 'focusEvents',
@ -10,7 +12,7 @@ export const FocusEvents = Extension.create({
return [
new Plugin({
key: new PluginKey('focusEvents'),
key: focusEventsPluginKey,
props: {
handleDOMEvents: {
focus: (view, event: Event) => {

View File

@ -2,7 +2,7 @@ export { ClipboardTextSerializer } from './clipboardTextSerializer.js'
export { Commands } from './commands.js'
export { Drop } from './drop.js'
export { Editable } from './editable.js'
export { FocusEvents } from './focusEvents.js'
export { FocusEvents, focusEventsPluginKey } from './focusEvents.js'
export { Keymap } from './keymap.js'
export { Paste } from './paste.js'
export { Tabindex } from './tabindex.js'