Make text not selectable

I am using the following schema:

Doc
  * Page
    * Header
    * Body
      * All content
    * Footer

When I focus on body content and press CMD+A all content (including header and footer) gets selected. The behavior I am aiming to achieve is to be able select only body content when I am at the body; header content, when in the header; footer content, when in the footer; I have tried setting contenteditable to false dynamically, using selectable false, however, none of these seemed to help.

Would appreciate any ideas

You may need to judge the pos when you press CMD+A to decide which behavior you want.

1 Like

Ended up doing exactly this. Thanks!