Support for embedding links and references in text editor (#9003)

Signed-off-by: Victor Ilyushchenko <alt13ri@gmail.com>
This commit is contained in:
Victor Ilyushchenko
2025-05-21 11:45:08 +07:00
committed by GitHub
parent e201abcc91
commit 007b11c9df
39 changed files with 1554 additions and 77 deletions
@@ -32,6 +32,7 @@
export let accent: boolean = false
export let noOverflow: boolean = false
export let inlineReference: boolean = false
export let transparent: boolean = false
let _disabled = disabled || $restrictionStore.disableNavigation
$: _disabled = disabled || $restrictionStore.disableNavigation
@@ -70,6 +71,7 @@
{accent}
{noOverflow}
{inlineReference}
{transparent}
>
<slot />
</NavLink>
@@ -31,6 +31,7 @@
export let component: AnyComponent | undefined = undefined
export let disabled: boolean = false
export let onClick: ((event: MouseEvent) => void) | undefined = undefined
export let transparent: boolean = false
const client = getClient()
const hierarchy = client.getHierarchy()
@@ -124,7 +125,7 @@
data-label={displayTitle}
use:tooltip={docTooltip}
>
<DocNavLink object={doc} component={docComponent} {disabled} inlineReference {onClick}>
<DocNavLink object={doc} component={docComponent} {disabled} inlineReference {onClick} {transparent}>
{#if icon}<Icon {icon} size="small" />{' '}{:else}@{/if}{displayTitle}
</DocNavLink>
</span>
@@ -68,5 +68,8 @@
pre {
font-family: var(--mono-font);
white-space: pre !important;
word-wrap: nowrap !important;
font-size: 0.8125rem;
}
</style>