31 行
1.4 KiB
Markdown
31 行
1.4 KiB
Markdown
# XXB Clipboardjs
|
|
|
|
 [](https://packagist.org/packages/xxb5724/clipboardjs)
|
|
|
|
A [Flarum](https://flarum.org) 2.0 extension. Use [Clipboardjs](https://clipboardjs.com/) to add copy code approach with code language display to your Flarum. You can choose 7 different button styles, like GitHub, SegmentFault, etc.
|
|
|
|
Supports 47 common languages by default:
|
|
.properties, apacheconf, bash, bbcode, c, csharp, css, cpp, coffeescript, diff, django, docker, dockerfile, git, go, html, ini, java, javadoc, js, json, less, lua, makefile, markdown, nginx, objectivec, perl, php, powershell, properties, python, python-repl, regex, ruby, rust, sass, scss, sql, stylus, swift, typescript, vim, visual-basic, vue, xml, yaml.
|
|
|
|
### Installation
|
|
|
|
Install manually with composer:
|
|
|
|
```sh
|
|
composer require xxb5724/clipboardjs
|
|
```
|
|
|
|
> **Migrating from ffans/clipboardjs**
|
|
> This extension was transferred to XXB and was previously published as `ffans/clipboardjs`. The XXB line begins at **2.0.0**, continuing the version history (the previous package reached 1.0.0).
|
|
> For forum admins, migration is a one-line change — swap the package, keep your settings and stored SEO data:
|
|
```sh
|
|
composer remove ffans/clipboardjs
|
|
composer require xxb5724/clipboardjs
|
|
php flarum cache:clear
|
|
```
|
|
|
|
### Updating
|
|
|
|
```sh
|
|
composer update xxb5724/clipboardjs
|
|
``` |