Public
Edited
Sep 22, 2024
Insert cell
Insert cell
viewof input = Inputs.textarea({title: 'html'})
Insert cell
viewof exp1Css = Inputs.text()
Insert cell
exp(($) => {
return $(exp1Css).text();
})
Insert cell
exp(($) => {
$("img[src]").map((_, e) => {
const newEl = $(e).clone();
newEl.attr("src", "ffs.png");
$(e).replaceWith(newEl);
});
return $.html();
})
Insert cell
exp(($) => {
const indexEl = $("a[name=INDEX] ~ a[name=A]").nextUntil(
`hr,
a[name=Guideline_Navigation_Instructions],
.content:has(hr),
.content:has(a[name=Guideline_Navigation_Instructions])`
);
return $.html(indexEl);
})
Insert cell
exp(($) => {
const aboutEl = $("a[name=about], p:has(> a[name=about])");
const siblings = aboutEl.nextAll();
return $.html(siblings);
})
Insert cell
Insert cell
cheerio = require('https://bundle.run/cheerio@1.0.0-rc.5')
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