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

Purpose-built for displays of data

Observable is your go-to platform for exploring data and creating expressive data visualizations. Use reactive JavaScript notebooks for prototyping and a collaborative canvas for visual data exploration and dashboard creation.
Learn more