Giter VIP home page Giter VIP logo

Comments (11)

viebel avatar viebel commented on August 23, 2024 1

This is the modified jsbins that demonstrate it:

  1. delay a bit the loading the klipse script - http://jsbin.com/nuhusu/edit?html,js,output
  2. 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.

viebel avatar viebel commented on August 23, 2024

Thanks @ianwang
The reason is that klipse is loaded before react has added it's element to the dom. There are 2 solutions:

  1. delay a bit the loading the klipse script
  2. 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.

ianwang avatar ianwang commented on August 23, 2024

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.

viebel avatar viebel commented on August 23, 2024

@ianwang have you made progress on your project?

from klipse.

ianwang avatar ianwang commented on August 23, 2024

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.

viebel avatar viebel commented on August 23, 2024

@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.

viebel avatar viebel commented on August 23, 2024

@ianwang there is now a secured mode inside KLIPSE that prevents malicious code and XSS.

from klipse.

ianwang avatar ianwang commented on August 23, 2024

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.

viebel avatar viebel commented on August 23, 2024

from klipse.

viebel avatar viebel commented on August 23, 2024

@ianwang Please wait a bit before allowing people to write interactive content - as there are still flaws in Klipse secured mode.

from klipse.

ianwang avatar ianwang commented on August 23, 2024

👌

from klipse.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.