New syntax for table caption #804
-
I'm using Remark via MDX for NextJS, and using custom components for rendering. The hack with imageTo parametrise the images display I use the standard "alt" attribute ![{align: 'center'}](image.png) and later export default function Image({src, alt}) {
const options = JSON.parse(alt)
return <img src={src} style={{textAlign: options.align}} />
} But the table doesn't provide such a built-in-way to push a caption in the metadata of the table The solution with tablesWhat about an extension of the std table definition, like | a | b |
| --- | --- |
| 1 | 2 |
[caption] |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 3 replies
-
Markdown as a semi-standard way to add/wrap custom content types, directives. |
Beta Was this translation helpful? Give feedback.
-
Thank you @ChristianMurphy for pointing at the existing package https://github.com/zestedesavoir/zmarkdown/tree/master/packages/remark-captions |
Beta Was this translation helpful? Give feedback.
Thank you @ChristianMurphy for pointing at the existing package
https://github.com/zestedesavoir/zmarkdown/tree/master/packages/remark-captions