Skip to content

Commit

Permalink
Updated read, deleted sample.
Browse files Browse the repository at this point in the history
  • Loading branch information
wwalc committed May 29, 2015
1 parent f6a5e27 commit b339fce
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 86 deletions.
17 changes: 15 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,28 @@ This is a proof-of-concept plugin that adds support for injecting charts into CK
To render charts, the [Chart.js](http://www.chartjs.org/) library is used.
The plugin serves as an example of using external JavaScript libraries in CKEditor, using the [widgets feature](http://docs.ckeditor.com/#!/guide/widget_sdk_intro). It has lots of comments inside to help you understand how it was built.

## Live Demo

View [live demo](http://wwalc.github.io/chart/).

## Installation

1. Put the plugin into the CKEditor "plugins" folder.
2. Enable the plugin with `config.extraPlugins`
3. Add the `Chart` button to the toolbar if it will not appear automatically.

In case of any problems with installation, there is a sample available: (`samples/chart.html`), which should work out of the box.

CKEDITOR.replace( 'editor1', {
extraPlugins: 'chart'
}

In case of any problems with installation, there is [an online sample](http://wwalc.github.io/chart/sample.html) available that should help you get started.

## Rendering charts on a website

Chart created in CKEditor is represented as a simple `<div>` element with data attributes. This is by design, because such a simplified form allows you to re-edit the chart in the future. It ensures that your content will be future-proof, allowing you to to use different styling for charts embed on your website when you redesign it or to use the future major versions of Chart.js library with different API/features.

To convert `<div>` elements into charts, include `chart.min.js` and `widget2chart.js` on your website. See `samples/chart.html` for an example.
To convert `<div>` elements into charts, include `chart.min.js` and `widget2chart.js` on your website. See the [online sample](http://wwalc.github.io/chart/sample.html).

## Screenshot

Expand All @@ -27,6 +36,10 @@ To convert `<div>` elements into charts, include `chart.min.js` and `widget2char

For now, this is a proof-of-concept plugin. However if you would like to leave any feedback, fill a future request, report a bug etc., feel free to do so.

## Browser compatibility

Any modern browser should be supported. **IE8 is not supported.**

### License

Licensed under the GPL, LGPL and MPL licenses, at your choice.
Expand Down
84 changes: 0 additions & 84 deletions samples/chart.html

This file was deleted.

0 comments on commit b339fce

Please sign in to comment.