Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Minmum html to try klipse #76

Closed
kimh opened this issue Jun 22, 2016 · 1 comment
Closed

Minmum html to try klipse #76

kimh opened this issue Jun 22, 2016 · 1 comment

Comments

@kimh
Copy link

kimh commented Jun 22, 2016

I'm trying to use klipse for clojure. I save the following html locally and open with Chrome but the evaluation is not happening.

<html>
    <head>
        <meta charset="utf-8">
        <title>Foo</title>
        <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>
   </head>

   <body>
        <p>And now, we are going to <strong>klipsify</strong> this code snippet:</p>

        <pre><code class="language-klipse">(map inc [1 2 3])
        </code></pre>
    </body>
</html>

Is this supposed to work? Or am I missing anything?

I'm using Chrome 51.0.2704.103 (64-bit) on OSX and I can see the following logs in developer console. I don't see any errors.

KLIPSE version: 1.0.1
klipse_plugin.js:12959 register-mode:  eval-clojure selector
klipse_plugin.js:12959 register-mode:  transpile-clojurescript selector_js
klipse_plugin.js:12959 register-mode:  eval-ruby selector_eval_ruby
klipse_plugin.js:12959 register-mode:  eval-javascript selector_eval_js
klipse_plugin.js:12959 settings:  #js {:selector .language-klipse}
klipse_plugin.js:12959 (settings): [object Object]
klipse_plugin.js:12959 settings: {"selector" ".language-klipse"}
klipse_plugin.js:12959 (keys (clojure.core/deref selector->mode)): ("selector" "selector_js" "selector_eval_ruby" "selector_eval_js")
klipse_plugin.js:12959 (array-seq (js/document.querySelectorAll selector)): 
klipse_plugin.js:12959 klipsify-elements:  nil eval-clojure
klipse_plugin.js:12959 "Elapsed time: 0.055000 msecs"
@viebel
Copy link
Owner

viebel commented Jun 27, 2016

@kimh You need to put the klipse javascript tag at the end of the body. I will add this information to the documentaion.

@viebel viebel closed this as completed Jun 27, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants