Skip to content

How to choose from images list for <img> edition? #902

Answered by DmitrySharabin
GalinhaLX asked this question in Q&A
Discussion options

You must be logged in to vote

Hey there, @GalinhaLX! 👋🏻

Do you mean something like that:

<img property="myImage" mv-editor="#imageList" mv-default="https://mavo.io/img/logo-mit.svg" />

<select id="imageList" hidden>
	<option>https://i.imgur.com/LPeWcag.png</option>
	<option>https://mavo.io/logo.svg</option>
	<option>https://mavo.io/img/logo-mit.svg</option>
</select>

Please note that to replace the default editor, we should use the mv-editor attribute. And the value of this attribute is a valid selector (like in CSS) that allows Mavo to find the corresponding element on the page. That's why we use #imageList in the code above (since we ask Mavo to find the <select> element by its id attribute).

Hope it helps!

Replies: 2 comments 3 replies

Comment options

You must be logged in to vote
2 replies
@GalinhaLX
Comment options

@DmitrySharabin
Comment options

Answer selected by GalinhaLX
Comment options

You must be logged in to vote
1 reply
@GalinhaLX
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants