I'm in the process of creating a interactive bulletin board with React. I successfully used React Quill for the POST editor and saved the content to the server without any issues. While the CSS styles from the Quill editor were properly reflected and saved on the server, they do not display correctly when imported and viewed on the screen. How can I import Quill's css file?
This particular piece of code parses HTML text that was saved using Quill as dangerouslySetInnerHTML.
<div className="view" dangerouslySetInnerHTML={{ __html: data?.content }}></div>
The following snippet is a sampling of the code I input into Quill.
<p class="ql-align-center">
<img src="https://myrecord.s3.ap-northeast-2.amazonaws.com/e2c36fce-8ce0-4ae8-a188-9ca549ebe2ea.jpg">
</p>
<p class="ql-align-justify">
<span class="ql-size-huge">1차 세계 대전의 발발과 미국</span>
</p>
Is there a way to import a css file containing styles such as ql-align-center
, ql-align-justify
? ?