2012-02-25 34 views
0

我正在爲我的rails應用程序使用ckeditor。我保存頁面後,顯示未格式化的內容,未格式化的內容Ckeditor和rails問題

<p> <strong>test</strong></p> <h3 style="color:blue;"> <strong>test 1</strong></h3> 

我在這裏丟失了什麼?

+0

它不是很好的做法,造型在HTML嘗試做在CSS。 – uday 2012-02-25 06:45:41

+0

如何在CSS?是不是ckeditor處理? – 2012-02-25 06:51:46

回答

2

我猜你正在使用rails 3.x.試試這個<%= raw "your database stored HTML string"%>

在你的情況<%= raw "<p> <strong>test</strong></p> <h3 style="color:blue;"> <strong>test 1</strong></h3>" %>

+0

很酷的感謝,但它與wothout報價一起工作,因爲我有@ page.description。但謝謝:) – 2012-02-25 06:49:16