Skip to content

Run js code examples in browser while presenting via Reveal.js

License

Notifications You must be signed in to change notification settings

ntnbrtnkv/run-in-browser

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Run In Browser

npm


A plugin for Reveal.js, that allows to execute js code right in browser

It works for structure like this:

<pre><code>
    Here is the code
</code></pre>

then install the plugin and it will work automatically.

Installation

npm installation

This plugin is published to, and can be installed from, npm.

npm install reveal.js-run-in-browser

The plugin folder can then be referenced from node_modules/reveal.js-run-in-browser/dist/revealjs-run-in-browser

Setup

JavaScript

<script src="dist/reveal.js" />
<script src="node_modules/reveal.js-run-in-browser/dist/revealjs-run-in-browser" />
<script>
  Reveal.initialize({
    // ...
    plugins: [RunInBrowser],
  });
</script>