The host's preview of the draft, drawn while edit is off.
HEEx
<.switched_viewport
doc={@doc}
id={@controls[:id]}
toggle_id="catalog-viewport-toggle"
default_mode={@controls[:default_mode]}
viewport_controls=id="catalog-viewport" default_mode={:preview}
>
<ConnieUI.CrdtEditor.preview_toggle
id="catalog-viewport-toggle"
viewport_id={@controls[:id]}
default_mode={@controls[:default_mode]}
/>
</.switched_viewport>
Variant matrix
Every combination of one or two attributes, side by side.
Controls
Set by the example
entity_id smart_tags comment_threads comment_pending fill_external fill_data fill_attachment_urls fill_payout_methods fill_fee_types
Docs
No @doc for this component.
| Attribute | Type | Default | Description |
|---|---|---|---|
| No data found. | |||
| id | :string | "previewable-viewport" |
|
| toggle_id | :string | nil |
|
| entity_id | :list | nil |
|
| default_mode * | :atom |
:preview | :edit
|
|
| editable | :boolean | true |
|
| logo | :string | nil |
|
| smart_tags | :list | nil |
|
| disable_new_tag | :boolean | false |
|
| enable_custom_smart_tags | :boolean | false |
|
| import_url | :string | nil |
|
| import_max_size | :integer | nil |
|
| comment_threads | :list | nil |
|
| comment_selected | :string | nil |
|
| comment_pending | :map | nil |
|
| comment_enabled | :boolean | false |
|
| collaborators_here | :boolean | false |
see `crdt_editor/1`
|
| read_only | :boolean | false |
|
| reading_width | :boolean | false |
see `crdt_editor/1`
|
| fill_mode | :string | nil |
nil | issuer
|
| fill_validate | :boolean | false |
|
| fill_locked | :boolean | false |
|
| fill_external | :map | %{} |
|
| fill_data | :map | %{} |
|
| fill_attachment_urls | :map | %{} |
|
| fill_upload_url | :string | nil |
|
| fill_default_currency | :string | nil |
see `crdt_editor/1`
|
| fill_payout_methods | :list | [] |
see `crdt_editor/1`
|
| fill_fee_types | :list | [] |
see `crdt_editor/1`
|
| fill_reveal_sensitive | :boolean | false |
see `crdt_editor/1`
|
| fill_default_country | :string | nil |
see `crdt_editor/1`
|
| fill_bank_details_event | :string | nil |
see `crdt_editor/1`
|
| Slot | Slot attributes | Description |
|---|---|---|
| No data found. | ||
| :preview | what edit off shows. Optional: with `fill_mode` set, edit off is the fill mode of the editor itself, so there is nothing else to render. | |