Klipse 嵌入可执行代码片段

https://github.com/viebel/klipse

新建一个 HTML 文档,输入以下内容:

<div class="klipse">
  function foo(name) {
  return "Hello " + name;
  }
  foo("Klipse");
</div>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/viebel/klipse@master/dist/codemirror.css">
<script>
  window.klipse_settings = {
    selector_eval_js: '.klipse', // css selector for the html elements you want to klipsify
  };
</script>
<script src="https://cdn.jsdelivr.net/gh/viebel/klipse@master/dist/klipse_plugin.min.js"></script>
欢迎通过「邮件」或者点击「这里」告诉我你的想法
Welcome to tell me your thoughts via "email" or click "here"