You've already forked joplin
mirror of
https://github.com/laurent22/joplin.git
synced 2025-06-30 23:44:55 +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;
|