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

https://github.com/aureleoules/mediumeditor-flatrgb

This is a MediumEditor extension. Add colors to your document!
https://github.com/aureleoules/mediumeditor-flatrgb

extension js medium-editor

Last synced: 8 days ago
JSON representation

This is a MediumEditor extension. Add colors to your document!

Awesome Lists containing this project

README

          

# medium-editor-flat-rgb
Add colors to your document

# Documentation

## `new FlatRGB(color)`
Creates a new instance of a FlatRGB button.

# How to use

* Import `src/flatRGB.js` or `src/flatRGB.min.js`
* Import `src/flatRGB.css`

```js
window.onload = function () {
const editor = new MediumEditor('.editor', {
toolbar: {
buttons: [
'bold',
'italic',
'underline',
'anchor',
'h2',
'h3',
'quote',
'customColorRed',
'customColorGreen',
'customColorBlue'
],
},
extensions: {
"customColorRed": new window.FlatRGB("R"),
"customColorGreen": new window.FlatRGB("G"),
"customColorBlue": new window.FlatRGB("B"),
}
});
};
```

# License
See the [LICENSE](./LICENSE) file.