=== WordPress Playground Block ===
Contributors: dawidurbanski, zieladam
Tags: code, interactive, playground, block
Requires at least: 6.0
Tested up to: 6.4
Stable tag: 0.1.2
Requires PHP: 7.0
License: GPLv2
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Early preview: Enables building WordPress plugins directly in the browser thanks to WordPress Playground (https://github.com/WordPress/wordpress-playground)

# WordPress Playground Block

`wordpress-playground-block` is a Gutenberg block that embeds WordPress Playground in your posts and pages.

![CleanShot 2023-11-19 at 16 27 16](https://github.com/WordPress/playground-tools/assets/12466568/ebbc1d01-86db-4e17-a111-2aaf6fc09ea7)

You can also include an interactive code editor to demonstrate and teach your readers how WordPress plugins are built.

![CleanShot 2023-11-21 at 10 14 24](https://github.com/WordPress/playground-tools/assets/12466568/f2ff13e3-392a-4de9-aaf3-45f077abc42c)

## Usage

-   Navigate to any post or page editing screen in WordPress.
-   Click the '+' button to add a new block and search for 'Interactive Code Block'.
-   Select the Interactive Code Block from the list of available blocks.
-   A new interactive code block will be inserted into your post or page. You can start typing PHP code directly into the block.
-   Click the 'Run' button to execute the code and see the results in the output area below the code block.

## All features

-   Embed WordPress Playground
-   Log in automatically
-   Specify landing page
-   Create new post or page
-   Redirect to newly created post or page
-   Specify blueprint to apply on init
-   Enable/disable code editor
-   Make code editor read-only
-   Allow multiple files in code editor

## Resources

Resources:

-   [Source code](https://github.com/WordPress/playground-tools/tree/trunk/packages/wordpress-playground-block)
-   [WordPress Plugins page](https://wordpress.org/plugins/wordpress-playground-block/)
-   [WordPress Playground](https://developer.wordpress.org/playground)
-   [WordPress Playground repository](https://wordpress.github.io/wordpress-playground/)

## Support

For any issues or questions about the WordPress Playground Block, please open a GitHub issue in the [playground-tools](https://github.com/WordPress/playground-tools) repository.

**This is an early preview to gather feedback and apply polish. This plugin isn't yet a well-rounded and feature-complete solution.**

## License

The WordPress Playground Block Plugin is licensed under the GNU General Public License v2.0. This is a free software license that allows you to use, modify, and distribute the software, provided you adhere to its terms and conditions.
