Skip to content

Conversation

blade47
Copy link

@blade47 blade47 commented Jun 13, 2025

I assume most people, like me, use this library for email purposes.
Besides upgrading list I have also improved the image layout to adapt it to email clients:

Screenshot 2025-06-15 at 07 14 07

@blade47 blade47 changed the title Add support for editorjs list 2.0 Add support for editorjs list 2.0 and improve image translation Jun 15, 2025
const isCaptionBlank = !caption || caption.trim() === "";

return `<img src="${url}" alt="${caption}" />`;
return `<table role="presentation" border="0" cellpadding="0" cellspacing="0" width="100%">
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @blade47
Can you update this to just return an image? this might be the best option for emails but the purpose of the lib is to simply return html and with existing projects using this would break the functionality.

Also, you could add any styling using css. Ideally, the image element should just return image. On the other end, I am okay with you adding a custom parser which can then be plugged in the library constructor.


export const list = ({ data }: OutputBlockData) => {
const listStyle = data.style === "unordered" ? "ul" : "ol";
let listStyle = "ul";
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we use const instead?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants