Image injection failed -


#1

First attempt failed due to my lack of javascript knowledge

second attempt failed also, I added

https://anymod.com/mod/allrka?h1=20&h2=53&v=69

So my question is WHY did my second attempt fail? I merely copied the HTML I was supposed to copy, see here:

https://anymod.com/home


#2

This should be clearer, but that syntax is for handlebars. It looks like the mod is currently in “Plain” HTML mode, so you will need to click the dropdown for HTML and select “Handlebars”


#3

Also I believe your JavaScript from the first attempt is working, but your CSS is hiding the image :smile:


#4

I know my first attempt worked. I just remained unable to append those two images to the div with the classname of: append_here.

Thank you for this link, finally I start to understand what those “handlebars” really do. They seem to be needed to import thoses placeholder-strings successfully. Hmm, okay, thank you:
https://handlebarsjs.com/expressions.html


#5

PS: why should anyone ever want to choose Plain html over the handlebars? Are some things only doable in plain-html mode?


#6

There are times when you want the Handlebars syntax turned off, like if you are using Vue.js, because both use the {{ }} syntax. So Handlebars might mess up your Vue code in that instance. By default we have Handlebars turned on for most mods; we’ll try to make it more consistent though!