Skip to content

Commit 826cfe7

Browse files
authoredMar 27, 2025··
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
1 parent 9abb019 commit 826cfe7

File tree

3 files changed

+9
-2
lines changed

3 files changed

+9
-2
lines changed
 

‎.changeset/eighty-hotels-listen.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@tiptap/core": patch
3+
---
4+
5+
Export focusEvents plugin key

‎packages/core/src/extensions/focusEvents.ts

+3-1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@ import { Plugin, PluginKey } from '@tiptap/pm/state'
22

33
import { Extension } from '../Extension.js'
44

5+
export const focusEventsPluginKey = new PluginKey('focusEvents')
6+
57
export const FocusEvents = Extension.create({
68
name: 'focusEvents',
79

@@ -10,7 +12,7 @@ export const FocusEvents = Extension.create({
1012

1113
return [
1214
new Plugin({
13-
key: new PluginKey('focusEvents'),
15+
key: focusEventsPluginKey,
1416
props: {
1517
handleDOMEvents: {
1618
focus: (view, event: Event) => {

‎packages/core/src/extensions/index.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ export { ClipboardTextSerializer } from './clipboardTextSerializer.js'
22
export { Commands } from './commands.js'
33
export { Drop } from './drop.js'
44
export { Editable } from './editable.js'
5-
export { FocusEvents } from './focusEvents.js'
5+
export { FocusEvents, focusEventsPluginKey } from './focusEvents.js'
66
export { Keymap } from './keymap.js'
77
export { Paste } from './paste.js'
88
export { Tabindex } from './tabindex.js'

0 commit comments

Comments
 (0)
Please sign in to comment.