0.1.18 • Published 7 days ago

drepl v0.1.18

Weekly downloads
-
License
Apache-2.0
Repository
github
Last release
7 days ago

DREPL

Disent REPL widget

Widget to put mini python cells in your docs, webpages, whatnot.

Current version supports python for RCE (remote code execution) on repl.disent.com using our sandbox. bash has a theme but no RCE. Maybe we add more? Let us know.

Feedback please

Install

bash$ yarn add drepl 

Use

import { Repl } from 'drepl';
<Repl defaultInput={"print(\"Hello World!\")"} />

Hello World

^ this a picture, github doesn't allow embedded widgets 😔 (@github 📧 us we can help with that!)

Props

propdefaultdescription
replURI"https://repl.disent.com"REPL server
defaultInput""initial input next to prompt
defaultOutput""inital output to display
imports""code you don't want user to see, like imports
disabledfalsedisables user interactivity, shows default input/output
multiLinefalsevertical mode
language"python"also have "bash" (doesn't execute)
width"525px"width
height"225px"height (only if multiLine=true)
inputRatio40% input to output
runOnLoadtruerun on initial page load

Pure JS/HTML way

For the props above just add as data-* tags on the below

<div class="disent-embed" data-defaultinput='print("Hello World")'></div>
<script type='text/javascript' src="http://repl.disent.com/drepl.js" async></script>
0.1.17

8 days ago

0.1.18

7 days ago

0.1.12

1 month ago

0.1.13

1 month ago

0.1.14

1 month ago

0.1.15

1 month ago

0.1.16

1 month ago

0.1.11

1 month ago

0.1.10

1 month ago

0.1.6

1 month ago