medium-editor-colorpicker-buttons
v0.0.4
Published
### install: ```sh npm install medium-editor-colorpicker-buttons ```
Downloads
164
Readme
Extension medium-editor-colorpicker-buttons for MediumEditor
install:
npm install medium-editor-colorpicker-buttons
usage:
const MediumEditor = require('medium-editor');
const mediumEditorColorButtons = require('medium-editor-colorpicker-buttons').get(MediumEditor);
/*
mediumEditorColorButtons: {
TextColorButtonClass: TextColorButtonClass;
ColorPickerFormAbstractClass: ColorPickerFormAbstractClass;
version: string
}
*/
const TextColorButtonClass = mediumEditorColorButtons.TextColorButtonClass
new MediumEditor('.etitable', {
toolbar: {
buttons: ['bold', 'italic', 'underline', 'anchor', 'h2', 'h3', 'textcolor']
},
/*textcolor?: {
colors?: Array<string>;
moreColorText?: string;
pickerCloseTimeout?: number;
},*/
extensions: {
textcolor: new TextColorButtonClass(/* options? */)
}
})