Closed simonw closed 6 years ago
The hook is currently only used on the custom SQL results page - it needs to run on table/view pages as well.
First plugin using this hook: https://github.com/simonw/datasette-json-html
Hook documentation: http://datasette.readthedocs.io/en/latest/plugins.html#render-cell-value
I used datasette-json-html
to build this: https://russian-ira-facebook-ads-datasette-whmbonekoj.now.sh/russian-ads-919cbfd/display_ads
I don't want to re-open this issue, but I'm wondering whether it would be possible to include the full row for which a specific cell is to be rendered in the hook signature. My use case are rows where custom rendering would need access to multiple values (specifically, rows containing the constituents of interlinear glossed text (IGT) in separate columns, see https://github.com/cldf/cldf/tree/master/components/examples).
I could probably cobble this together with custom SQL and the sql-to-html plugin. But having a full row within a render_cell
implementation seems a lot simpler.
To allow plugins to customize how values matching a specific pattern are displayed in the HTML table view.