feat: The first available version.

This commit is contained in:
2023-06-05 03:54:08 +08:00
parent 57b7ca2df4
commit fba2455772
10 changed files with 2637 additions and 171 deletions

View File

@ -1 +1,37 @@
# wp-asciiplayer-reloaded
# wp-asciiplayer
Play Ascicast files in the post!
[中文文档](README-zh.md)
## Quick start
Add a shortcode to the post and enter the following:
```
[asciiplayer]https://asciinema.org/a/28307.cast[/asciiplayer]
```
The content of the shortcode is the URL of the ascicast file.
### Options
The AsciiPlayer shortcode supports the options supported by Asciinema-player, such as setting `fit` to `height` and closing the control bar:
```
[asciiplayer fit="height" controls="false"]https://asciinema.org/a/28307.cast[/asciiplayer]
```
You can find all available options [here](https://www.npmjs.com/package/asciinema-player#options).
> Currently, only the `logger` option is not supported because it requires an object to be passed in.
#### Style options
For the convenience of customizing player elements,
the plugin has added an additional `style` **option**,
which corresponds to the `style` **attribute** of the player container element:
```
[asciiplayer style="width: 80%;"]https://asciinema.org/a/28307.cast[/asciiplayer]
```