No, you evidently don’t quite understand how MouseReveal works. Allow me to explain…
Each item gets added as an HTML list item (this is great for accessibility and SEO). The text of the list item is used as the title shown on the button. The content you want to be triggered by MouseReveal is stored in HTML
data- attribute and renders the desired image or video file in the main panel. This also conveniently solves the problem of starting and stopping playing media. And restoring mouse focus back to the page (super important for accessibility).
In the case of images, you can mix both images and caption content together. Many style options are provided to facilitate this need.
It would be nigh-on-impossible to take the contents of a
%slice% in the Stacks API and move the whole lot into a
data- attribute. For starters, the first instance of a quote mark in the code that Stacks generates would end the
data- attribute prematurely and result in completely corrupted output. You would also lose all your formatting.
The person I originally made MouseReveal for is currently building a website that will be seen and used by Joe Biden and other senior members of the White House administration, to highlight pressing health and social care issues in the US. So if it’s good enough for the American president, it should be good enough for you too! But like all stacks, you have to be using the correct ones for the right jobs.