Files
outline/shared/editor/extensions/PreventTab.ts
2023-05-24 19:24:05 -07:00

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,
};
}
}