https://github.com/25th-floor/hallo-simplecolorpicker-plugin
hallo editor plugin
https://github.com/25th-floor/hallo-simplecolorpicker-plugin
Last synced: 3 months ago
JSON representation
hallo editor plugin
- Host: GitHub
- URL: https://github.com/25th-floor/hallo-simplecolorpicker-plugin
- Owner: 25th-floor
- License: mit
- Created: 2013-07-26T09:52:37.000Z (almost 12 years ago)
- Default Branch: master
- Last Pushed: 2016-01-27T10:41:10.000Z (over 9 years ago)
- Last Synced: 2025-02-20T20:03:06.968Z (3 months ago)
- Language: JavaScript
- Size: 4.88 KB
- Stars: 1
- Watchers: 9
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
jquery-simplecolorpicker plugin for Hallo Editor
=====================================[Hallo](https://github.com/bergie/hallo) was written by Henri Bergius
[jquery-simplecolorpicker](https://github.com/tkrotoff/jquery-simplecolorpicker) was written by Tanguy KrotoffThis plugin just works as an adapter for hallo so you can use the simplecolorpicker in it.
## Dependencies
Obvious the Hallo Editor and the jquery-simplecolorpicker as since they need jquery and jquery-ui you need to add them too.
## Using the Plugin
You need jQuery and jQuery UI loaded. An easy way to do this is to use Google's JS service:
```html
```
Then include Hallo and the jquery-simplecolorpicker themselves
```html
```
Finally this plugin itself:
```html
```
Using the Plugin is easy, just add the plugin into your hallo plugin:
```javascript
jQuery('p').hallo({
plugins: {
'hallosimplecolorpicker' : {}
}
});
```This example would enable the default colors.
### Options
The Plugin provides some options you can override:
* `colors`: the colors you want to configure the simplecolorpicker to work on.
* `simplecolorpicker`: the options for the simplecolorpicker jquery plugin which are passed through. See the plugins [README](https://github.com/tkrotoff/jquery-simplecolorpicker) for more informationThe `colors` option uses an Option for the configuration where the key is the hex value and the value is the label for the select options.
```javascript
colors: {
"#7bd148": "Green",
"#5484ed": "Bold blue",
"#a4bdfc": "Blue",
"#46d6db": "Turquoise",
"#7ae7bf": "Light green",
"#51b749": "Bold green",
"#fbd75b": "Yellow",
"#ffb878": "Orange",
"#ff887c": "Red",
"#dc2127": "Bold red",
"#dbadff": "Purple",
"#e1e1e1": "Gray",
"#000000": "Black"
}
```## Licensing
Hallo is free software available under the [MIT license](http://en.wikipedia.org/wiki/MIT_License).