diplodoc-platform / diplodoc-platform/transform
Feature Request: Add Captions to Images
- Dominant language
- TypeScript
- Stars
- 69
- Forks
- 59
- Avg merge
- 1d 21h
- Merged PRs (30d)
- 6
Description
#### Description
The current version of YFM allows users to add images with `alt-text` and `title` props. To enhance image context and readability, i propose utilizing the `figcaption` HTML tag for rendering captions.
To enable the display of the caption you need to add the `{ caption }` as attribute, the default value is equal to the title, but it can also be passed in the attribute
#### Example Syntax
```markdown
{ caption }
```
In this example, the "Caption text" should be rendered within a figcaption tag below the image.
#### Example HTML Output
The resulting HTML should look like this:
```html
Caption text
```
DOCSTOOLS-3428
Contributor guide
Assessment
This issue has not been assessed yet.