-
-
Notifications
You must be signed in to change notification settings - Fork 86
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
here's how to handle column support #52
Labels
Comments
Thanks for sharing, I marked it as information and won't close this issue for future reference. |
Improved version with responsive css and support of titles + paragraphs + images in each column (exactly like Notion) n2m.setCustomTransformer("column_list", async (block) => {
const mdBlocks_temp = await n2m.pageToMarkdown(block.id);
let final_md_string = `<div className="column" style={{ display: "flex", columnGap: "25px" }}>`;
for (const one_block of mdBlocks_temp) {
const mdString_temp = n2m.toMarkdownString(one_block.children);
final_md_string = final_md_string + `<div>${mdString_temp}</div>`
}
return final_md_string + "</div>"
}); .column div {
display: flex;
justify-content: center;
flex-direction: column;
}
@media screen and (max-width: 630px) {
.column {
flex-direction: column;
}
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I needed to show 2 images in one row (2 columns), but it isn't directly possible. Currently, content in columns is rendered as individual rows. I figured out a way to show it in columns as how it is shown in Notion.
I thought of sharing it in case others are looking for same.
The text was updated successfully, but these errors were encountered: