Clicking outside the editor and caret position

In many editors, clicking outside the editor still allows the caret to be placed. See for example Google Docs. This editor has wide margins, but you can still click in these margins to reposition the caret.

Any ideas on how to achieve this effect in ProseMirror?

Mouse events are only handled when they actually hit the editor. But you can increase the padding of the .ProseMirror-content css class to create a clickable empty space around the content.

1 Like