xxxxxxxxxx
// make sure to import Rect from utils
import { Rect } from "ckeditor5/src/utils";
_getCursorPositionData() {
const view = this.editor.editing.view;
const viewRange = view.document.selection.getFirstRange();
const rangeTarget = view.domConverter.viewRangeToDom(viewRange);
const rangeRects = Rect.getDomRangeRects(rangeTarget);
const lastRect = rangeRects.pop();
return lastRect;
}