Public
Edited
Feb 14
Insert cell
Insert cell
Insert cell
Insert cell
allinlineDemo = md`<div style='white-space: break-spaces;'>A line of poetry
An indented line,
And a line with space within it.
</div>`
Insert cell
Insert cell
styledDivClassDemo = md`<div class="verse">A line of poetry
An indented line,
And a line with space within it.
</div>`
Insert cell
verseClass = html`
<style>
.verse {
white-space: break-spaces;
}
</style>`
Insert cell
Insert cell
customTag = md`<dla-verse>A line of poetry
An indented line,
And a line with space within it.
</dla-verse>`
Insert cell
Insert cell
verseTag = {
class Verse extends HTMLElement {
constructor() {
super(); // Always call super first in constructor
this.setAttribute('style', 'white-space: break-spaces');
}
}
try {
customElements.define('dla-verse', Verse);
return "<dla-verse> has been initially constructed and registered";
} catch (err) {
if (err.name == "NotSupportedError")
return "<dla-verse> is constructed and registered";
console.error(err);
}
}
Insert cell
Insert cell
customTag.innerText
Insert cell
Insert cell
rsDemo = rs`A line of ( poetry | verse )
An indented line,
And a line with space within it.
`
Insert cell
Insert cell
rsPulseDemo = (oneSecondPulse,
rs`<dla-verse>A line of (poetry | verse | arty prose)
An indented ( line | gobbet),
And a (line | gobbet) with ( space | nothings ) within it.
</dla-verse>`)
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