Skip to content
JSFiddle Integration into GitBook
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
src
tests
.gitignore
.npmignore
.travis.yml
LICENSE
README.md
index.js
karma.conf.js
package.json
yarn.lock

README.md

Build Status

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.

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 does.

Also you can see simple example in https://github.com/Mavrin/gitbook-example

You can’t perform that action at this time.