Load content

This plugin allows to load content of an HTML element from a file.

Check out the demo

Setup

To use the plugin include

<!-- Load content plugin -->
<script src="https://cdn.jsdelivr.net/npm/reveal.js-plugins@latest/loadcontent/plugin.js"></script>

to the header of your presentation and configure reveal.js and the plugin by

Reveal.initialize({
// ...
plugins: [ RevealLoadContent ],
// ...
});

Usage

Simply add a data-load attribute with the filename to a <div> element, to load the file and add the content into to the <div>.

<div data-load="graphics.svg">
<!-- Content of graphics.svg will be added here -->
</div>

License

MIT licensed

Copyright © 2023 Asvin Goel

47.6k
豫ICP备2023032045号-1