debian-mirror-gitlab/app/assets/javascripts/content_editor/services/utils.js

6 lines
125 B
JavaScript
Raw Normal View History

2021-09-04 01:27:46 +05:30
export const hasSelection = (tiptapEditor) => {
const { from, to } = tiptapEditor.state.selection;
return from < to;
};