Shortcode to generate HTML details tag, which is used to specify additional details that the user can open and close on demand.
Become a backer or sponsor to support our work.
1{{% details [summary] [open] %}}
2CONTENT
3{{% /details %}}
summary
Position | Name | Type | Required | Default | Since | Example |
---|---|---|---|---|---|---|
#0 | summary | string | ✓ | - | - | - |
The summary of details.
open
Position | Name | Type | Required | Default | Since | Example |
---|---|---|---|---|---|---|
#1 | open | boolean | - | - | - | - |
When true
, expand the details by default.
1{{% details "hello.php" %}}
2```php
3echo "Hello world!";
4```
5{{% /details %}}
1echo "Hello world!";
1{{% details "hello.js" true %}}
2```js
3console.log("Hello world!");
4```
5{{% /details %}}
1console.log("Hello world!");