[TSK-1327] Clickable links for string presenters and rich text editor (#3088)

Signed-off-by: Sergei Ogorelkov <sergei.ogorelkov@icloud.com>
This commit is contained in:
Sergei Ogorelkov
2023-04-27 19:28:12 +07:00
committed by GitHub
parent 324ff317cb
commit 073e55b15c
10 changed files with 94 additions and 37 deletions
@@ -15,7 +15,7 @@
<script lang="ts">
import type { Class, Doc, Ref, Space } from '@hcengineering/core'
import { getClient } from '@hcengineering/presentation'
import { AnyComponent } from '@hcengineering/ui'
import { AnyComponent, LinkWrapper } from '@hcengineering/ui'
import view from '@hcengineering/view'
import { DocNavLink } from '@hcengineering/view-resources'
import plugin from '../plugin'
@@ -52,13 +52,11 @@
</div>
{#if description}
<span class="ac-header__description">
{#if description.trim().startsWith('http://') || description.trim().startsWith('https://')}
<a href={description} class="whitespace-nowrap" target="_blank" rel="noreferrer noopener">
{description}
</a>
{:else}
{description}
{/if}
<div class="flex">
<span class="overflow-label" title={description}>
<LinkWrapper text={description} />
</span>
</div>
</span>{/if}
</div>