jpuri / react-draft-wysiwyg

A Wysiwyg editor build on top of ReactJS and DraftJS. https://jpuri.github.io/react-draft-wysiwyg
MIT License
6.38k stars 1.16k forks source link

Option to autofocus inside of a link popover #1404

Open seangibbens opened 8 months ago

seangibbens commented 8 months ago

When configuring the link component inside of a toolbar, it would be nice if there was an option to autofocus inside of the "Link Title" or "Link Target" fields in the popup. When adding a link inside of the editor, it would eliminate an extra click which would be nice.

Here are the current options:

link: {
    inDropdown: false,
    className: undefined,
    component: undefined,
    popupClassName: undefined,
    dropdownClassName: undefined,
    showOpenOptionOnHover: true,
    defaultTargetOption: '_self',
    options: ['link', 'unlink'],
    link: { icon: link, className: undefined },
    unlink: { icon: unlink, className: undefined },
    linkCallback: undefined
  }