Comments (11)
This is the modified jsbin
s that demonstrate it:
- delay a bit the loading the klipse script - http://jsbin.com/nuhusu/edit?html,js,output
- after react is loaded, run
klipse.plugin.init(klipse.run.plugin_prod.plugin.settings());
- http://jsbin.com/conobo/edit?html,js,console,output
from klipse.
Thanks @ianwang
The reason is that klipse is loaded before react has added it's element to the dom. There are 2 solutions:
- delay a bit the loading the klipse script
- after react is loaded, run
klipse.plugin.init(klipse.run.plugin_prod.plugin.settings());
- it will make klipse reparse the DOM and convert the selected elements to klipse snippets.
BTW, what do you plan to do with the integration of klipse with react?
from klipse.
oh nice! Thanks for helping. I think I'll go for 2).
I'm working on a new project at Codementor which involves a markdown editor that can generate klipse snippets in preview mode. Should be available in a couple of weeks. We're trying to build a knowledge sharing network for our community, the editor is one of the crucial parts of it.
Would love to give you an update when it's online. 😄
from klipse.
@ianwang have you made progress on your project?
from klipse.
yes! it works well and really brings post like tutorial to another level!
We haven't released it yet since there might be some XSS issues.
here is the early version of the editor
from klipse.
@ianwang
CodeMentor looks really great.
Do you have an example of an interactive tutorial?
I'm working on supplying a setting in klipse that will make the execution of the snippets into a sandbox with limited access to the window object: no access to document
(cookies), no access to ajax functions.
I'd be happy to open a Clojure community on CodeMentor.
Maybe we can continue this conversation on email: [email protected]
from klipse.
@ianwang there is now a secured mode inside KLIPSE that prevents malicious code and XSS.
from klipse.
Wow it's awesome! Thank you @viebel!
I don't have any examples right now since the feature is not really available
but with secured_eval
, I believe I can make it public very soon
I was thinking to upgrade posts like these:
from klipse.
from klipse.
@ianwang Please wait a bit before allowing people to write interactive content - as there are still flaws in Klipse secured mode.
from klipse.
👌
from klipse.
Related Issues (20)
- CORS blocks script HOT 4
- new issue with reagent, and loading namespaces? HOT 2
- Adding class="hidden" is not hiding code snippets HOT 1
- Unable to use npm package HOT 1
- Clojure.spec is broken HOT 2
- Allow Klipse to be easilly embedded as an iframe HOT 3
- hello world HOT 3
- how to find compiler versions? HOT 1
- Klipse Snippets not loading on Klipse blogpost HOT 1
- Add Deno runtime and Dartlang HOT 1
- Python dependency on skulpt.0.10.0.min.js? HOT 2
- Klipse's GitBook Clojure[script] links seem to be broken HOT 1
- Pyodide:
- Support for nim language HOT 1
- Any way to evaluate a snippet only when a button is clicked? (not evaluate all the time)
- `cljs.core.match` fails to load HOT 1
- cannot fetch from viebel.github.io HOT 3
- Is there Haskell support? HOT 3
- Is there Zig support? HOT 1
- Missing input box HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from klipse.