An open API service indexing awesome lists of open source software.

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

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 Krotoff

This 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 information

The `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).