mirror of
https://github.com/overleaf/overleaf.git
synced 2024-10-24 21:12:38 -04:00
e025088065
Add documentation for CodeMirror extensions GitOrigin-RevId: e5f07084173f201919272f9d46dcdaef4b817874
19 lines
333 B
TypeScript
19 lines
333 B
TypeScript
import { foldAll, toggleFold, unfoldAll } from '@codemirror/language'
|
|
|
|
/**
|
|
* A custom extension that binds keyboard shortcuts to folding actions.
|
|
*/
|
|
export const foldingKeymap = [
|
|
{
|
|
key: 'F2',
|
|
run: toggleFold,
|
|
},
|
|
{
|
|
key: 'Alt-Shift-1',
|
|
run: foldAll,
|
|
},
|
|
{
|
|
key: 'Alt-Shift-0',
|
|
run: unfoldAll,
|
|
},
|
|
]
|