Fork me on GitHub
#clojurescript
<
2023-11-09
>
Amos06:11:19

Hi, I wonder is there any suggested rich-text editor library for the cljs?

p-himik07:11:10

I'd recommend settling on some JS library and using it via appropriate interop.

hifumi12322:11:47

prosemirror may be worth looking into, its a fork of codemirror designed for working with markdown

Pavan Kumar18:11:11

how to use clojure.java.shell in clojurescript file

p-himik18:11:30

You can't.

p-himik18:11:51

Is that CLJS code running on Node or in a browser?

Pavan Kumar18:11:09

I need to call some python files from my cljs

p-himik18:11:42

But where do you run that CLJS code, on which platform - browser or Node? Or something else?

p-himik18:11:34

The only choice is to create an endpoint on your server that, when requested, uses clojure.java.shell. And then hit that endpoint from the CLJS code.

p-himik18:11:03

Although, there's another alternative if you're willing to run an additional server and deal with CORS. You can create that special endpoint within a separate Python server and run the Python code from there, without the need for clojure.java.shell. But the overall concept is still the same.

Pavan Kumar18:11:26

Agreed, Both are good suggestions. Let me try the later. Thanks :)

👍 1
johanatan19:11:59

@U2FRKM4TW pyodide is an option

johanatan19:11:31

if you simply need to run Python in the browser

p-himik19:11:47

That's a big if, but perhaps a viable option for the OP.

johanatan19:11:52

My point was to distinguish between merely executing Python logic and executing Python logic that manipulates a host (i.e., sandboxed or not). From CLJS, is beside the point

👍 1