-
-
Notifications
You must be signed in to change notification settings - Fork 95
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Question: example "notion-to-md" repositories? #84
Comments
Have you tried using the |
Like @that-ambuj mentioned you can use the n2m.setCustomTransformer("video", async (block) => {
const { video } = block as any;
const { type } = video;
const video_url = video[type].url;
return `
<video src="${video_url}" controls>
Your browser does not support the video tag.
</video>
`;
});
As far as your question is concerned I would suggest checking out the used by section on the right sidebar of the repo or here is the link |
So it's a minor fix. In the code sample, I have provided, there is leading space in the string due to which it is rendered as a code block. Here is how you can fix it: n2m.setCustomTransformer("video", async (block) => {
const { video } = block as any;
const { type } = video;
const video_url = video[type].url;
return `<video src="${video_url}" controls> Your browser does not support the video tag. </video>`;
}); or n2m.setCustomTransformer("video", async (block) => {
const { video } = block as any;
const { type } = video;
const video_url = video[type].url;
return (`
<video src="${video_url}" controls>
your browser does not support the video tag.
</video>
`).trim();
}); |
I believe Refer to this: https://stackoverflow.com/a/70548866 |
Hello, I currently have a problem because I don't know how to put blocks like "video" into nice html. Even after following your wiki you provided. Here is my current code: https://github.com/hecker/hecker.vc/blob/main/lib/notion.ts
My question is: do you know if there are any repositories that are open-source and already use notion-to-md so I can check how it works and get some inspiration?
The text was updated successfully, but these errors were encountered: