Published
Edited
Sep 4, 2020
3 stars
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
vegaSpecInfo = getVegaSpecInfo('https://vega.github.io/editor/#/url/', vegaSpecUrl);
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
vegaEmbed = require('vega-embed@6')
Insert cell
Insert cell
Insert cell
html`<style>
#editor {
margin-top: 1em;
margin-bottom: 1em;
min-height: 12em;
}
</style>`
Insert cell
Insert cell
Insert cell
Insert cell
getURLFromCM = path => `https://unpkg.com/@codemirror/next@${CODEMIRROR_VERSION}/${path}/dist/index.js`
Insert cell
importFromCM = path => importRecursive(getURLFromCM(path), resolverForCM)
Insert cell
Insert cell
isMac = /Mac/.test(navigator.platform)
Insert cell
Insert cell
languageHighlighter = {
return (await importFromCM('lang-' + language))[language]()
}
Insert cell
Insert cell
cmTheme = CodeMirrorImports.view.EditorView.theme({
scroller: {
'font-family': 'Fira Mono, monospace'
},
wrap: {
'border': '1px solid silver'
},
searchmatch: {
/* bug in 0.4 beta, seems fixed in master branch? */
// 'background': '#ffa'
},
})
Insert cell
Insert cell
Insert cell

One platform to build and deploy the best data apps

Experiment and prototype by building visualizations in live JavaScript notebooks. Collaborate with your team and decide which concepts to build out.
Use Observable Framework to build data apps locally. Use data loaders to build in any language or library, including Python, SQL, and R.
Seamlessly deploy to Observable. Test before you ship, use automatic deploy-on-commit, and ensure your projects are always up-to-date.
Learn more