Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
viebel committed Aug 21, 2016
1 parent f09e81a commit 81aa4ed
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 37 deletions.
4 changes: 2 additions & 2 deletions project.clj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
(defproject klipse "2.3.0"
:description "Cljs compiler in cljs"
:dependencies [[org.clojure/clojure "1.8.0"]
[org.clojure/clojurescript "1.9.198"]
:dependencies [[org.clojure/clojure "1.9.0-alpha10"]
[org.clojure/clojurescript "1.9.211"]
[org.clojure/core.async "0.2.385"]
[im.chit/purnam "0.5.2"]
[cljsjs/markdown "0.6.0-beta1-0"]
Expand Down
32 changes: 1 addition & 31 deletions resources/public/playground-dbg.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,37 +14,7 @@
<br/>


<div class="lambda">
{div {@ style="text-align:center;font:bold 2em georgia;color:red;"} √(3{sup 2}+4{sup 2}) = {sqrt {+ {* 3 3} {* 4 4}}}}
</div>
<br/>
<div class="lambda">
{def amélie {img
{@ id="amelie"
src="http://epsilonwiki.free.fr/lambdaway/data/amelie_poulain.jpg"
height="150"
title="Amélie Poulain"
style="box-shadow:0 0 8px black;
border:1px solid white;
-webkit-transform:rotate(-5deg);
-moz-transform:rotate(-5deg);
transform:rotate(-5deg);"}}}
{amélie}
</div>
<br/>
<pre>
<code class="eval-html" data-editor-type="html">
&lt;h1&gt; Title &lt;/h1&gt;
&lt;b&gt; bold &lt;/b&gt;
</code>
</pre>


<div class="eval-html" data-editor-type="html">
&lt;img id="amelie" src="http://epsilonwiki.free.fr/lambdaway/data/amelie_poulain.jpg" height="150" title="Amélie Poulain" style="box-shadow:0 0 8px black; border:1px solid white; -webkit-transform:rotate(-5deg); -moz-transform:rotate(-5deg); transform:rotate(-5deg);"&gt;&lt;/img&gt;
</div>



<script src="https://viebel.github.io/klipse/examples/lambdaway_eval.js"></script>
<script>
window.klipse_settings = {
Expand Down
9 changes: 5 additions & 4 deletions src/klipse/plugin.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
(:require
[klipse.args-from-element :refer [editor-args-from-element eval-args-from-element content]]
[klipse.klipse-editors :refer [create-editor]]
[clojure.spec :as s :refer [instrument]]
[clojure.spec :as s]
[clojure.spec.test :as stest :refer-macros [instrument]]
[clojure.walk :refer [keywordize-keys]]
[goog.dom :refer [isElement]]
[cljs.core.async :refer [<!]]
Expand Down Expand Up @@ -72,7 +73,7 @@

(s/def ::mode string?)

(s/fdef klipsify
(s/fdef klipsify
:args (s/cat :element ::dom-element
:settings ::klipse-settings
:mode ::mode))
Expand All @@ -96,5 +97,5 @@
(defn ^:export init [js-settings]
(init-clj (js->clj js-settings :keywordize-keys false))); we cannot keywordize the keys as the modules might be written in javascript

(s/instrument #'klipsify)
(s/instrument #'klipsify-with-opts)
(instrument `klipsify)
(instrument `klipsify-with-opts)

0 comments on commit 81aa4ed

Please sign in to comment.