-
Notifications
You must be signed in to change notification settings - Fork 41
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
25 additions
and
11 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<script lang="ts"> | ||
import { studioClient } from '/@/utils/client.js'; | ||
export let href: string = ""; | ||
export let title: string | undefined = undefined; | ||
export let text: string = ""; | ||
const onClick = () => { | ||
studioClient.openURL(href); | ||
} | ||
</script> | ||
<!-- href set to void operator to avoid any redirect --> | ||
<a href="{'javascript:void(0);'}" role="button" title="{title}" on:click={onClick}>{text}</a> |
10 changes: 10 additions & 0 deletions
10
packages/frontend/src/lib/markdown/MarkdownRenderer.svelte
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
<script lang="ts"> | ||
import SvelteMarkdown from 'svelte-markdown' | ||
import LinkComponent from '/@/lib/markdown/LinkComponent.svelte'; | ||
export let source: string | undefined; | ||
</script> | ||
|
||
<article class="prose min-w-full"> | ||
<SvelteMarkdown {source} renderers="{{link: LinkComponent}}" /> | ||
</article> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters