mirror of
https://github.com/ueberdosis/tiptap.git
synced 2025-06-13 05:11:04 +08:00
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:
parent
9abb0190c5
commit
826cfe7406
5
.changeset/eighty-hotels-listen.md
Normal file
5
.changeset/eighty-hotels-listen.md
Normal file
@ -0,0 +1,5 @@
|
||||
---
|
||||
"@tiptap/core": patch
|
||||
---
|
||||
|
||||
Export focusEvents plugin key
|
@ -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) => {
|
||||
|
@ -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'
|
||||
|
Loading…
Reference in New Issue
Block a user