mirror of
https://github.com/muerwre/markdown-home-tab.git
synced 2025-04-25 08:56:41 +07:00
add hotkeys
This commit is contained in:
parent
6d00bffbec
commit
db911e51e4
14 changed files with 91 additions and 73 deletions
|
@ -44,6 +44,15 @@ const DefaultLayout = ({
|
|||
...panelProps.params,
|
||||
locked: !locked,
|
||||
});
|
||||
|
||||
if (panelProps.params.locked) {
|
||||
setTimeout(() => {
|
||||
document
|
||||
.getElementById(panelProps.api.id)
|
||||
?.querySelector("textarea")
|
||||
?.focus();
|
||||
}, 0);
|
||||
}
|
||||
}, [locked, panelProps.api, panelProps.params]);
|
||||
|
||||
useEffect(() => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue