https://github.com/mavrin/gitbook-plugin-jsfiddle
JSFiddle Integration into GitBook
https://github.com/mavrin/gitbook-plugin-jsfiddle
gitbook javascript jsfiddle
Last synced: 9 months ago
JSON representation
JSFiddle Integration into GitBook
- Host: GitHub
- URL: https://github.com/mavrin/gitbook-plugin-jsfiddle
- Owner: Mavrin
- License: mit
- Created: 2015-01-09T09:38:07.000Z (about 11 years ago)
- Default Branch: master
- Last Pushed: 2022-04-28T21:10:11.000Z (over 3 years ago)
- Last Synced: 2025-03-27T23:01:48.882Z (10 months ago)
- Topics: gitbook, javascript, jsfiddle
- Language: JavaScript
- Size: 254 KB
- Stars: 13
- Watchers: 2
- Forks: 3
- Open Issues: 9
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[](https://travis-ci.org/Mavrin/gitbook-plugin-jsfiddle)
JSFiddle integration for GitBook
==============
### 1. You can use install it via **NPM** and save it to package.json:
```
$ npm install gitbook-plugin-jsfiddle --save
```
### 2. add the plugin to `book.json` config
```
{
"plugins": [ "jsfiddle"],
"pluginsConfig": {
"jsfiddle":{
"type":"script",
"tabs":["result","js","css", "html"],
"height": "500",
"width": "500",
"fontColor": "00FF00"
}
}
}
```
Param `type` can be 'frame' or 'script'.
Also you can use [other params](https://medium.com/jsfiddle-updates/new-jsfiddle-embeds-93ab7a51ee11#.vt34bxchv).
If you need to override setting for certain fiddle, you can just add this param in hash
`https://jsfiddle.net/4o4z6fqn/9/#fontColor=00FF00&type=frame`
### 3. paste jsfiddle embedded code to you book something like
`[source code](https://jsfiddle.net/4o4z6fqn/9/)`
will be rendered like [my book](http://api.taucharts.com/tutorials/1min.html) does.
Also you can see simple example in https://github.com/Mavrin/gitbook-example