Skip to content
forked from viebel/klipse

A simple code evaluator embeddable on any web page: clojure, ruby, javascript

Notifications You must be signed in to change notification settings

GurzuInc/klipse

 
 

Repository files navigation

KLIPSE Circle CI

The klipse plugin is a javascript tag that transforms static code snippets of an html page to live and interactive snippets:

  1. Live: The code is executed in your browser
  2. Interactive: You can modify the code and it is evaluated after 2 seconds of inactivity

Supported languages

  • javascript
  • clojure[script]
  • ruby

Live Examples

Integration

In order to integrate the klipse plugin on a blog, library documentation or any other web page, add the following javascript tag according to the language of the code snippets:

javascript

<link rel="stylesheet" type="text/css" href="http://app.klipse.tech/css/codemirror.css">

<script>
    window.klipse_settings = {
        selector_eval_js: '.language-klipse-eval-js', // css selector for the html elements you want to klipsify
    };
</script>
<script src="http://app.klipse.tech/plugin_prod/js/klipse_plugin.min.js"></script>

ruby

<link rel="stylesheet" type="text/css" href="http://app.klipse.tech/css/codemirror.css">

<script>
    window.klipse_settings = {
        selector_eval_ruby: '.language-klipse-eval-ruby', // css selector for the html elements you want to klipsify
    };
</script>
<script src="http://cdn.opalrb.org/opal/current/opal.min.js"></script>
<script src="http://cdn.opalrb.org/opal/current/opal-parser.min.js"></script>
<script src="http://app.klipse.tech/plugin/js/klipse_plugin.js"></script>

clojure

<link rel="stylesheet" type="text/css" href="http://app.klipse.tech/css/codemirror.css">

<script>
    window.klipse_settings = {
        selector: '.language-klipse'// css selector for the html elements you want to klipsify
    };
</script>
<script src="http://app.klipse.tech/plugin/js/klipse_plugin.js"></script>

About

A simple code evaluator embeddable on any web page: clojure, ruby, javascript

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Clojure 51.3%
  • HTML 31.5%
  • CSS 11.4%
  • JavaScript 5.8%