nozer/quill-delta-to-html

Background Color Support

valentinbdv opened this issue · 2 comments

It seems like quill-delta-to-html doesn't had the background color.

I guess this would not be too complicated to had it as there is already the color which is working perfectly.

This is the same logic but with the "background" attribute of the delta and it should set the "background-color" style of the node.

Tell me if I can help. ;)

nozer commented

It does produce background-color:.... Given these ops:

[{insert: "cads f "}, {attributes: {background: "#e60000"}, insert: "fdfd"}, {insert: " fsd "}]

it produces this output

<p>cads f <span style="background-color:#e60000">fdfd</span> fsd </p>

Can you give an example to show how it doesn’t produce the expected result?

Ok I have found the issue then.

I had set the allowBackgroundClasses to true which prevent the basic background color.

My bad.