mirror of
https://github.com/outline/outline.git
synced 2026-05-01 06:59:55 -05:00
d5341a486c
Co-authored-by: Apoorv Mishra <apoorvmishra101092@gmail.com>
17 lines
356 B
TypeScript
17 lines
356 B
TypeScript
import { Command } from "prosemirror-state";
|
|
import Extension from "../lib/Extension";
|
|
|
|
export default class PreventTab extends Extension {
|
|
get name() {
|
|
return "preventTab";
|
|
}
|
|
|
|
keys(): Record<string, Command> {
|
|
return {
|
|
// No-ops prevent Tab escaping the editor bounds
|
|
Tab: () => true,
|
|
"Shift-Tab": () => true,
|
|
};
|
|
}
|
|
}
|