fix: fixed the issue of unable to create sketches.

The livecode API has been generalized and there was some
backwackward-incompatible changes in that proces. Added
livecode-canvas.js with the required options to fix the issue.
This commit is contained in:
Anand Chitipothu
2021-05-07 13:59:38 +05:30
parent 84b4833fed
commit 3c8cffc5ad
3 changed files with 113 additions and 2 deletions

View File

@@ -49,15 +49,16 @@
{% macro LiveCodeEditorJS(name, code) %}
<script type="text/javascript" src="{{ livecode_url }}/static/livecode.js"></script>
<script type="text/javascript" src="/assets/community/js/livecode-canvas.js"></script>
<script type="text/javascript">
var livecodeEditors = [];
$(function() {
$(".livecode-editor").each((i, e) => {
var editor = new LiveCodeEditor(e, {
runtime: "python-canvas",
base_url: "{{ livecode_url }}",
codemirror: true
...getLiveCodeOptions()
})
livecodeEditors.push(editor);
})