google / google/codeworld

Better embeddable editor

Open
#1,248 2 comments 0 reactions 0 assignees View on GitHub
discussion
Dominant language
Haskell
Stars
1.3k
Forks
201
PR merge metrics
No merged PRs in 30d

Description

It's possible to embed CodeWorld into an iframe in a larger page. However, it's not a great experience currently. The page loads a sidebar with currently open projects that you can swap through, auto-runs any code that's loaded into it with a new pane on the right, and cannot be controlled at all from the parent frame. We can do better.

Ideas here:

1. Have a kind of URL that loads code into JUST an editor. There should be options to disable all the extras, like the project browser, auto-run, even the Run button at all, etc. There should be an option to make it read-only if desired. Possibly there should be options to customize the styles to match the parent frame. An optional button to pop out into the full CodeWorld environment in a new tab would be nice, too.

2. Define a protocol for the CodeWorld editor to communicate with its parent. For example, the parent frame should be able to send the editor commands to scroll to a location, and highlight a range of the document. The parent should also be able to intercept the Run command so it can run the program in a different location instead of popping out from the right side of the page.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.