mirror of
https://github.com/gristlabs/grist-core.git
synced 2024-10-27 20:44:07 +00:00
17 lines
495 B
TypeScript
17 lines
495 B
TypeScript
|
import {marked} from 'marked';
|
||
|
|
||
|
export const renderer = new marked.Renderer();
|
||
|
|
||
|
renderer.image = (href: string, text: string) => {
|
||
|
return `<div class="doc-tutorial-popup-thumbnail">
|
||
|
<img src="${href}" title="${text ?? ''}" />
|
||
|
<div class="doc-tutorial-popup-thumbnail-icon-wrapper">
|
||
|
<div class="doc-tutorial-popup-thumbnail-icon"></div>
|
||
|
</div>
|
||
|
</div>`;
|
||
|
};
|
||
|
|
||
|
renderer.link = (href: string, _title: string, text: string) => {
|
||
|
return `<a href="${href}" target="_blank">${text}</a>`;
|
||
|
};
|