@Override
protected ContentElement maybePlaceMissingCursorContainer(Point.El<ContentNode> at) {
logger.error().log("PROBLEM: Had to create a line container to accommodate the cursor!");
ContentElement line = null;
if (!LineContainers.isLineContainer(FullContentView.INSTANCE, at.getContainer())) {
// create line container and line atomically:
line = LineContainers.appendLine(mutableDocument, null, Attributes.EMPTY_MAP);
} else {
line = LineContainers.appendLine(mutableDocument, (ContentElement) at.getContainer(), null);
}
// return the local p element as the target for the cursor:
ContentElement inserted = Line.fromLineElement(line).getParagraph();
needsCorrection = true;
return inserted;
}