HEEx
<div class="w-3xl">
<ConnieUI.Crdt.projection id="catalog-crdt-projection">
<.live_component
module={ConnieUI.Playground.ProjectionFeed}
id="catalog-crdt-feed"
doc={@doc}
/>
<ConnieUI.CrdtEditor.crdt_editor id="catalog-crdt-projected" smart_tags={[]} read_only />
</ConnieUI.Crdt.projection>
</div>
Controls
Docs
Hosts a collaborator's projection of a draft (PRD-058): the document as the
server lets them read it, with no Yjs anywhere on the page.
The server pushes the projection as ProseMirror JSON (`"view:reset"` with
`epoch`, `version` and `doc`), then each change to it (`"view:patch"` with
`epoch`, `base`, `version`, `from`, `to`, `blocks` and `attrs`: the top-level
blocks of version `base` from `from` up to `to` replaced) and the team's
cursors placed in it (`"view:cursors"` with `epoch` and `cursors`). A patch
for a version the page does not hold is answered with `"projection:resync"`,
which the host answers with a fresh reset.
Its child `ConnieUI.CrdtEditor.crdt_editor/1` finds the projection as it finds
a Yjs connection, on the nearest ancestor's `__crdt` (here with `source:
"projection"`), and draws it read-only. The host's own children are patched
as usual: the editor's element is ignored by itself.
| Attribute | Type | Default | Description |
|---|---|---|---|
| No data found. | |||
| id * | :string |
|
|
| rest | :global |
|
|
| Slot | Slot attributes | Description |
|---|---|---|
| No data found. | ||
| inner_block * | ||