2012-02-25 35 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