Giter Site home page Giter Site logo

Comments (1)

stefanprobst avatar stefanprobst commented on June 26, 2024

this is working as intended.

the cms image widget creates a markdown image, which looks like this:

![optional alt text](/path/to/image.png "optional title")

when transformed into html, we get:

<img alt="optional alt text" src="/path/to/image.png" title="optional title">

the alt attribute of an html img should be used for a description on the image for users who cannot see the image, either because they are using assistive tech like a screen reader, or because the network connection failed. when the alt attribute is set to an empty string, it signals to assistive tech that this image is only decorative.

the title attribute of any html element will be displayed as a tooltip. since hover interactions require a pointer device, we should not use the title attribute for important information, because some users (e.g. on touch devices) will not be able to see it.

if we want to display an image caption, we can use the html <figure> and <figcaption> elements. unfortunately, markdown does not have syntax to express these. this is why we need to use our custom <Figure> widget for image captions. this will generate:

<Figure alt="optional alt text" src="/path/to/image.png">
  Optional caption
</Figure>

for an example, see

<Figure
src="http://i.imgur.com/mvV1Z9k.jpg"
alt="Page from a dictionary"
>
Π’he Chambers Dictionary
</Figure>

in the cms rich text field, you can insert a figure via:

Screenshot_20240408_204223

and then provide the required fields:

Screenshot_20240408_204412

note that the caption field supports rich-text, so you can e.g. use a link in the figure caption

from dariah-campus.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.