sections
2 rows where breadcrumbs contains "JavaScript plugin objects" sorted by page
This data as json, CSV (advanced)
Suggested facets: breadcrumbs (array)
id | page ▼ | ref | title | content | breadcrumbs | references |
---|---|---|---|---|---|---|
javascript_plugins:javascript-plugins-makeabovetablepanelconfigs | javascript_plugins | javascript-plugins-makeabovetablepanelconfigs | makeAboveTablePanelConfigs() | This method should return a JavaScript array of objects defining additional panels to be added to the top of the table page. Each object should have the following: id - string A unique string ID for the panel, for example map-panel label - string A human-readable label for the panel render(node) - function A function that will be called with a DOM node to render the panel into This example shows how a plugin might define a single panel: document.addEventListener('datasette_init', function(ev) { ev.detail.registerPlugin('panel-plugin', { version: 0.1, makeAboveTablePanelConfigs: () => { return [ { id: 'first-panel', label: 'First panel', render: node => { node.innerHTML = '<h2>My custom panel</h2><p>This is a custom panel that I added using a JavaScript plugin</p>'; } } ] } }); }); When a page with a table loads, all registered plugins that implement makeAboveTablePanelConfigs() will be called and panels they return will be added to the top of the table page. | ["JavaScript plugins", "JavaScript plugin objects"] | [] |
javascript_plugins:javascript-plugins-makecolumnactions | javascript_plugins | javascript-plugins-makecolumnactions | makeColumnActions(columnDetails) | This method, if present, will be called when Datasette is rendering the cog action menu icons that appear at the top of the table view. By default these include options like "Sort ascending/descending" and "Facet by this", but plugins can return additional actions to be included in this menu. The method will be called with a columnDetails object with the following keys: columnName - string The name of the column columnNotNull - boolean True if the column is defined as NOT NULL columnType - string The SQLite data type of the column isPk - boolean True if the column is part of the primary key It should return a JavaScript array of objects each with a label and onClick property: label - string The human-readable label for the action onClick(evt) - function A function that will be called when the action is clicked The evt object passed to the onClick is the standard browser event object that triggered the click. This example plugin adds two menu items - one to copy … | ["JavaScript plugins", "JavaScript plugin objects"] | [] |
Advanced export
JSON shape: default, array, newline-delimited, object
CREATE TABLE [sections] ( [id] TEXT PRIMARY KEY, [page] TEXT, [ref] TEXT, [title] TEXT, [content] TEXT, [breadcrumbs] TEXT, [references] TEXT );