medium-draft
medium-draft copied to clipboard
how to add color-picker?
Hi, i want to add a clolor-picker component to toolbar, but I don't know how to add, can you give a suggest?
I have saw the drafts's example, that must set customStyleMap
, but I have many many colors ,so I don't know how to add color-picker function.
thanks.
There is no provision for complex toolbar components right now. Its only single interaction buttons for now.
Any update on this one @zwhu @brijeshb42
https://github.com/brijeshb42/medium-draft/commit/2c779f76a5eb005b202f6cd2c3dd7e709239290e
This commit adds support for properly rendering inline colored texts with text as well as background color. The demo implementation asks for the color input from prompt
as comma separated value of colors.
Now the only thing remaining is to add a proper UI component to pick the colors from instead of window prompt. You can pick up from this and maybe submit a PR.