{#if $controlledDocument && attribute} {#if headings.length > 0}
{/if}
handleShowHeading(ev.detail)} />
{#if $isEditable} { title = event.detail }} on:blur={handleUpdateTitle} /> {:else} {$controlledDocument.title} {/if} {#if $controlledDocument.state === DocumentState.Obsolete}
{#each { length: 24 } as _, i}
{/each}
{/if} $canViewDocumentComments || $canAddDocumentComments, getNodeHighlight: handleNodeHighlight, onNodeClicked: (uuids) => { // filter out those uuids that are not in comments uuids = Array.isArray(uuids) ? uuids : [uuids] uuids = uuids.filter((id) => commentUuids.includes(id)).sort() // scroll through the comments as user clicks on the same node const currIndex = selectedNodeId != null ? uuids.indexOf(selectedNodeId) : -1 const nextIndex = currIndex === -1 ? 0 : (currIndex + 1) % uuids.length selectedNodeId = uuids[nextIndex] if (!$arePopupsOpened && $canViewDocumentComments && selectedNodeId != null) { handleShowDocumentComments(selectedNodeId) } } } }, shortcuts: { tableMetadataPaste: true }, toc: { onChange: (h) => { headings = h dispatch('headings', h) } }, collaboration: { inlineComments: false } }} on:editor={(e) => (editor = e.detail)} attachFile={async (file) => { return await createEmbedding(file) }} /> {#if isActivityDocumentState($documentState)}
{/if}
{/if}