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!
- Host: GitHub
- URL: https://github.com/aureleoules/mediumeditor-flatrgb
- Owner: aureleoules
- License: mit
- Created: 2018-12-20T15:57:23.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2018-12-20T16:01:39.000Z (over 7 years ago)
- Last Synced: 2025-03-06T03:45:53.082Z (over 1 year ago)
- Topics: extension, js, medium-editor
- Language: JavaScript
- Size: 1.95 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
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.