mirror of
https://github.com/laurent22/joplin.git
synced 2024-12-24 10:27:10 +02:00
9 lines
274 B
TypeScript
9 lines
274 B
TypeScript
import { EditorState } from '@codemirror/state';
|
|
|
|
const isCursorAtBeginning = (state: EditorState) => {
|
|
const selection = state.selection;
|
|
return selection.ranges.length === 1 && selection.main.empty && selection.main.anchor === 0;
|
|
};
|
|
|
|
export default isCursorAtBeginning;
|