'Draft JS Header Toggles Not Working With Tailwind CSS

I am using Draft Js for Rich text editor in my react project that uses tailwind. H1-H6 have no effect when toggled on texts. The other block types (blockquote, ul, ol, code-block) work.

I have tried changing 'style' to className and use a tailwind class but it isn't working.

{label: 'H1', className: 'text-2xl'}

Any idea on why this isn't working?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source