Images on text hover (from textarea)

#1

Hello,

I am working on a website that will have images that appear on text hover.
So I need to provide a way for the user to select which text will, on hover, trigger which image.
This will happen on a textarea field.

Unless there is something specific I don’t know about, I was thinking about asking users to use some sort of notation such as:
{{this text}n}
Where n would be the position of the image to use on the image list (sidebar, list layout).

Reccomendations? Conflicts with special hidden notations?

Thank you

0 Likes

#2

@texnixe, sorry to invoke you but, could you please confirm that I can use something like…

{{this text}1}

…on a texteara, to signal text to be substituted with some html tags on the template, without conflicting with anything, kirby, kirbytext or markdown wise?

Thank you!

0 Likes

#3

I guess you can, but why not a regular tag?

this (hover: text show: image.jpg) will show an image.

A filename feels more reliable than a sort index.

1 Like

#4

Thanks @sylvainjule.
Is that markdown? kirbytext?
is it documented?

Thank you

0 Likes

#5

Yes, you’ll find the documentation for Kirbytags here. :slight_smile:

1 Like

#6

Oh, I see

what you mean is that I code my own kirbytag for this, right?

now I understand

Yes, great, this is what I was looking for.

Thank you.

0 Likes