Digital Solutions NotebookTL;DR This is a notebook extension that runs HTML, Javascript (including P5.js) and SQL. It can also highlight pseudocode according to QCAA conventions if you install the "Digital Solutions Psuedocode" extension. There is no renderer for pseudocode, it just prints out the text markup. Files need to have an extension *.dsnote to be recognised by the notebook. Video demo at Youtube https://www.youtube.com/embed/cEEfh6m_9lg HTMLNotebook can display almost any HTML, CSS and JS scripting in tags. Image files can be placed in the same folder as the notebook and referenced by name and they render. All html is referenced in the global scope of the notebook so changes can be made to the look of the entire workbook with CSS. Limitations: Cannot play audio or video. This is a limitation of the VSCode environment. Also, images won't show up in created iframes unless remotely referenced by http(s). JavascriptJavascript runs in the main scope of the notebook. So inputs in one cell can be used in another. It essentially wraps whatever is written into script tags and executed via eval. You can access and change elements refered to by name in HTML cells and dynamically change them.Console logs are routed back to the notebook and show up in the output. p5.jsp5.js cells create a document in an iframe and attach it to the cell output. Each instance is self contained and cannot be affected by other parts of the document.If you enter code without the setup() and draw() functions it will render statically to the screen in a small window. The window should automatically resize to fit the canvas size created. Probably try and avoid using windowWidth and windowHeight variables to set frame size to avoid disappointment. SQLSQL runs using sql.js under the hood. All standard SQL queries work.Extra commands:
Limitations:
|