how to fix content-security-policy issue which is caused by react-draft-wysiwyg editor value which have inline style in it after deploy and styles are not applied to it , because of the issue. how to fix it.
Fixing the issue depends on what CSP said in the violation message. Can be 3 kinds of inline styles and each has its own specifics.
The easiest way is to find where the React application publishes the CSP (it should be a meta tag) and add 'unsafe-inline' to the style-src directive.
This allows you to fix the problem with all three types of inline styles.
Most likely the meta tag with CSP is published by a plugin like react-static-plugin-csp-meta-tags, react-csp or react-helmet. Find it out and add 'unsafe-inline' to the style-src directive, but not to the default-src because in case of absent script-src this will allow execution inline scripts which is not safe.
Some plugins, for instance react-static-plugin-csp-meta-tags, allows to hashe inline styles like <style>...</style>. In this case you can avoid using 'unsafe-inline' and use a 'hash-value' if this <style> block is not changed time to time.