basecamp / trix

A rich text editor for everyday writing
https://trix-editor.org/
MIT License
19.03k stars 1.11k forks source link

Custom color formating lost after feeding data from database using React #932

Open ertemishakk opened 2 years ago

ertemishakk commented 2 years ago
 <input type="hidden" id="trix-input" value="<div>abc <span style=&quot;color: red;&quot;>123</span></div>">
    <trix-editor input="trix-input"></trix-editor>

The above code works just fine when using html. However, in a react component, css styles get stripped.

Details
rockwellll commented 2 years ago

Have you made any progress on this issue?. Thanks

ertemishakk commented 2 years ago

I've posted the answer here @rockwellll

https://stackoverflow.com/questions/69556005/react-trix-color-is-removed-when-feeding-data-to-input/70443218#70443218