[UI/UX] Documents & Rich Text Fields - Move Entire Section under Headings

Inside a Document or Rich Text Field, it would be amazing if the entire contextual contents of an anchoring block, such as a heading, could be moved.

Given:

  1. the way headings are used correctly across LLMs and regular documents (beyond just HTML) to contextually anchor the content that comes after them.
  2. and that Fibery docs already perfectly uses this concept to allow collapsing of headings, meaning that it accurately identifies the hierarchical heading context of any nested block.

As you can see below, right now this is not possible. I thought perhaps by collapsing the heading contents before moving it, would work, but it does not either.

20260319-1530-52.4806493

Possible solution

As far as UI goes, maybe the following would work, when if dragging by mouse or moving by keyboard:

  • an open/uncollapsed/expanded heading: just move the actual block.
  • a closed/collapsed heading: move the entire contextual content, i.e. everything that is collapsed under it.
  • an open/uncollapsed/expanded heading + a modifier like ALT/OPTION: treat same as a closed/collapsed one.

This further lends itself to another topic, which is adjusting (increasing/decreasing the level) the headings and all the sub-headings inside their context, if moved into the context of another heading, which would be the sweetest feature in our case, since we crate docs in Google Docs now, and as they develop we have to move things deeper or promote things to their own upper level headings, and right now we use a slow custom Google app script to do it.

I’ve gotten this complaint before from clients.

Honestly, I am surprised at how few online doc editors allow this, while it almost never makes sense to move just a heading and not its contents, if using headings as they are intended: anchors for their contents.

Given my example screen capture above, it is hard to imagine why anybody would intend to move just the heading Animals, or Trees, and not the entire hierarchy under them.

In a computer folder system, this would be akin to moving a folder, and having it leave its contents to be consumed by its ex-parent folder, and having itself move empty to the new destination :scream:!

Text editors are hard.

Oh yes! I remember years ago with TinyMCE and CKEditor, and then ContentEditable, but even with ProseMirror and its forks, it is very complicated. You are 100% right.

Thankfully in your case, you have done the heaviest lifting already, which is correct anchoring of headings. In other words when we collapse or expand a heading, the Fibery Document does it perfectly, since you have wired up the mechanism for even target (the heading) to know its contextual (not structural) descendants.

Leveraging this, you can make the move functionality, at least optionally, move the entire tree.

I hope we will do it soon

3 Likes

For later, when you work on this, I just tried moving the same heading collapsed and uncollapsed (second half of the gif).
20260319-1618-12.5407280