playground-tools icon indicating copy to clipboard operation
playground-tools copied to clipboard

Interactive Code Block: Extensibility

Open adamziel opened this issue 1 year ago • 0 comments

Description

Let's enable extending the interactive code block with predefined:

  • Libraries
  • Execution scripts
  • Output formatters

I put a "SQLite Battery" in a separate repo to illustrate what I mean here.

Rationale

I had to ship a custom output formatter called Tabular SQL queries in https://github.com/WordPress/wordpress-playground/pull/168 to support the following post about SQLite integration for WordPress:

CleanShot 2023-05-04 at 16 01 16@2x

I expect to need more of these and I'd rather not pollute the core repository with one-off utilities for very specific posts.

Done is

I can add a targeted set of libraries, execution scripts, and output formatters via wp-admin.

adamziel avatar May 04 '23 14:05 adamziel