Datasette plugin for rendering HTML based on JSON values
APACHE-2.0 License
Bot releases are hidden (Show)
Published by simonw about 3 years ago
Published by simonw about 4 years ago
Published by simonw about 4 years ago
(Actually released January 22nd 2020)
Published by simonw over 5 years ago
Links can now have tooltips (#2):
{
"href": "https://simonwillison.net/",
"label": "Simon Willison",
"title": "My blog"
}
Also added a live demo and linked to it throughout the README (#3, #1)
Published by simonw almost 6 years ago
You can use {"pre": "text"}
to render text in a <pre>
HTML tag:
{
"pre": "This\nhas\nnewlines"
}
Produces:
<pre>This
has
newlines</pre>
If the value attached to the "pre"
key is itself a JSON object, that JSON will be pretty-printed:
{
"pre": {
"this": {
"object": ["is", "nested"]
}
}
}
Produces:
<pre>{
"this": {
"object": [
"is",
"nested"
]
}
}</pre>