chore(collection/presentation): render note content

This commit is contained in:
Elian Doran 2025-10-15 19:49:25 +03:00
parent ecf29fa0e8
commit f9754cd82d
No known key found for this signature in database
2 changed files with 5 additions and 5 deletions

View File

@ -53,10 +53,8 @@ function Presentation({ presentation } : { presentation: PresentationModel }) {
} }
function Slide({ slide }: { slide: PresentationSlideModel }) { function Slide({ slide }: { slide: PresentationSlideModel }) {
const containerRef = useRef<HTMLDivElement>(null);
return ( return (
<section ref={containerRef}> <section dangerouslySetInnerHTML={slide.content}>
{slide.content} {slide.content}
</section> </section>
); );

View File

@ -1,7 +1,7 @@
import FNote from "../../../entities/fnote"; import FNote from "../../../entities/fnote";
export interface PresentationSlideModel { export interface PresentationSlideModel {
content: string; content: { __html: string; };
} }
export interface PresentationModel { export interface PresentationModel {
@ -15,7 +15,9 @@ export async function buildPresentationModel(note: FNote): Promise<PresentationM
for (const slideNote of slideNotes) { for (const slideNote of slideNotes) {
slides.push({ slides.push({
content: await slideNote.getContent() ?? "" content: {
__html: await slideNote.getContent() ?? ""
}
}) })
} }