mirror of
https://github.com/zadam/trilium.git
synced 2025-10-20 23:29:02 +02:00
chore(collection/presentation): render note content
This commit is contained in:
parent
ecf29fa0e8
commit
f9754cd82d
@ -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>
|
||||||
);
|
);
|
||||||
|
@ -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() ?? ""
|
||||||
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user