medium-draft icon indicating copy to clipboard operation
medium-draft copied to clipboard

how to add color-picker?

Open zwhu opened this issue 8 years ago • 3 comments

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.

zwhu avatar Nov 15 '16 16:11 zwhu

There is no provision for complex toolbar components right now. Its only single interaction buttons for now.

brijeshb42 avatar Nov 15 '16 17:11 brijeshb42

Any update on this one @zwhu @brijeshb42

janaka120 avatar Jun 05 '19 08:06 janaka120

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.

brijeshb42 avatar Jun 05 '19 15:06 brijeshb42