tags for inline content
renderer.paragraph = (text: string) => text;
// Override link to handle charm references
renderer.link = (href: string, title: string | null, text: string) => {
// For charm links, we'll add a special class and handle clicks
const titleAttr = title ? ` title="${title}"` : "";
return `${text}`;
};
const html_content = marked.parse(contentWithoutCheckbox, {
renderer,
breaks: false,
gfm: true,
});
if (checkboxState !== null) {
const isChecked = checkboxState === "checked";
return html`
{
e.stopPropagation();
this.handleCheckboxChange(
node,
getNodePath(this.tree, node) || [],
e,
);
})}"
/>
${unsafeHTML(html_content)}
`;
}
return html`
${unsafeHTML(html_content)}
`;
} catch (_) {
// Fallback to plain text if markdown parsing fails
return html`
${content}
`;
}
}
/**
* Render attachments for a node using ct-render
*/
private renderAttachments(node: Cell