# Patterns for rendering subsets of a document

**URL:** https://discuss.prosemirror.net/t/patterns-for-rendering-subsets-of-a-document/9002
**Category:** Uncategorized
**Created:** [April 25, 2026, 11:32pm UTC](https://discuss.prosemirror.net/t/patterns-for-rendering-subsets-of-a-document/9002 "2026-04-25T23:32:57Z")
**Posts on this page:** 1
**Showing post:** 2

<div class="post-metadata">

### Author: ![thesmartwon](https://discuss.prosemirror.net/user_avatar/discuss.prosemirror.net/thesmartwon/32/4453_2.png) [@thesmartwon](https://discuss.prosemirror.net/u/thesmartwon)
#### Post date: [April 28, 2026, 6:39pm UTC](https://discuss.prosemirror.net/t/patterns-for-rendering-subsets-of-a-document/9002/2 "2026-04-28T18:39:04Z")

</div>

I am also writing a book editor and have been wrestling almost a year now with `prosemirror-model` and `prosemirror-view` which are close, but not _quite_ what I need for [queryable and collaborative documents.](https://discuss.prosemirror.net/t/queryable-and-collaborative-prosemirror-documents/8977) I feel your pain.

Dervied subdocuments are an antipattern that has landed me in trouble. I think your problems can be solved by having a single document represent your book and then only showing the active chapter via a `nodeView` linked to state. An example is the [folding example](https://prosemirror.net/examples/fold/).

For your ToC you can limit headings to plaintext and use a `<ol><li><input value={heading}>` and 2-way bind the inputs. It should be pretty easy to make a transaction to replace the heading’s text from an `onchange` or `oninput` event. If your heading schema is more complicated you’ll want `<ol><li contenteditable class="ProseMirror">` with a derived schema that contains `nodes: { li: { ...bookSchema.nodes.heading, ...yourImpl } }`. Your 2-way binding will then require remapping transactions from the ToC editor to the book editor. You could even 2-way bind the selection if you really wanted.

---

_[View the full topic](https://discuss.prosemirror.net/t/patterns-for-rendering-subsets-of-a-document/9002)._
