Ckeditor5顯示css樣式


Ckeditor5在編輯模式是通過js加載樣式的,但是在顯示時沒有提供,官方提供了兩種方式來實現。

https://ckeditor.com/docs/ckeditor5/latest/builds/guides/integration/content-styles.html

By taking it directly from this guide and saving it as a static resource in your application (e.g. content-styles.css) (recommended).
By generating it using a dedicated script. Learn more in the Development environment guide.

Important!

If you take a closer look at the content styles, you may notice they are prefixed with the .ck-content class selector. This narrows their scope when used in CKEditor 5 so they do not affect the rest of the application. To use them in the front–end, you will have to add the ck-content CSS class to the container of your content. Otherwise the styles will not be applied.


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM