diff --git a/CHANGELOG.md b/CHANGELOG.md index 05e9cc57180..54e7e520713 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +### Added + +- Added / Updated documentation for insertGalleryContent to include instructions on inserting HTML based slides to the gallery. + ## [v2022-08-08T22.07.29] - 2022-08-08 ## [v2022-08-08T20.41.26] - 2022-08-08 diff --git a/source/includes/_methods.md b/source/includes/_methods.md index a821f6b26a4..57f9caf3370 100644 --- a/source/includes/_methods.md +++ b/source/includes/_methods.md @@ -167,9 +167,29 @@ Field Name | Purpose | Field Format (async APILoader => { const API = await APILoader.create(); + // Callback function to be called when your HTML slide is rendered. + const myCallback = (data) => { + // The `el` property is the top level HTML element where your content will be placed. You may modify this element or insert additional elements into it. + const { el } = data; + + // The height and width variables give you size information about the content placement location. + const { width, height } = data; + + el.style.height = height; + el.style.width = width; + + // The full Vehicle Object is available in the callback data. + const { vehicle } = data; + + // This destructures a few variables out of that vehicle object for later use. + // The height and width variables give you size information about the content placement location. + const { year, make, model, vin } = vehicle; + + el.innerHTML = `