# Issue with FckEditor

**URL:** <https://www.ruby-forum.com/t/issue-with-fckeditor/129402>\
**Category:** Rails\
**Created:** [February 18, 2008, 9:35am UTC](https://www.ruby-forum.com/t/issue-with-fckeditor/129402 "2008-02-18T09:35:51Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![dhaval\_parikh33](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/bcef8e/32.png) [@dhaval\_parikh33](https://www.ruby-forum.com/u/dhaval_parikh33)\
**Post date:** [February 18, 2008, 9:35am UTC](https://www.ruby-forum.com/t/issue-with-fckeditor/129402/1 "2008-02-18T09:35:51Z")

</div>

Hi all

I have integrated fck editor with my application and we all know that  
fck stores data in db in form of html

i.e **name**

so in the output page also we will get the html as text…So the problem  
is that it should automatically convert that to html form and display  
name in bold which is not happening currently…

Can any one tell me how to do that? Is there any function like in php  
its stripslashes to solve the problem…but what about RoR?

Please reply

Thanks

---

<div class="post-metadata">

**Author:** ![dhaval\_parikh33](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/bcef8e/32.png) [@dhaval\_parikh33](https://www.ruby-forum.com/u/dhaval_parikh33)\
**Post date:** [February 18, 2008, 12:27pm UTC](https://www.ruby-forum.com/t/issue-with-fckeditor/129402/2 "2008-02-18T12:27:46Z")

</div>

assuming a table pages with a column content:

controller:  
@page = Page.find(…)

view:  
\<%= @page.content(session[:language]) if @page -%\>

works fine with tinyMCE, but should be all the same for FCK (or whatever  
html in your db)

---

<div class="post-metadata">

**Author:** ![dhaval\_parikh33](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/bcef8e/32.png) [@dhaval\_parikh33](https://www.ruby-forum.com/u/dhaval_parikh33)\
**Post date:** [February 18, 2008, 12:40pm UTC](https://www.ruby-forum.com/t/issue-with-fckeditor/129402/3 "2008-02-18T12:40:13Z")

</div>

Thorsten M. wrote:

> assuming a table pages with a column content:
> 
> controller:  
> @page = Page.find(…)
> 
> view:  
> \<%= @page.content() if @page -%\>
> 
> works fine with tinyMCE, but should be all the same for FCK (or whatever  
> html in your db)

---

<div class="post-metadata">

**Author:** ![dhaval\_parikh33](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/bcef8e/32.png) [@dhaval\_parikh33](https://www.ruby-forum.com/u/dhaval_parikh33)\
**Post date:** [February 18, 2008, 12:41pm UTC](https://www.ruby-forum.com/t/issue-with-fckeditor/129402/4 "2008-02-18T12:41:45Z")

</div>

sorry, copy pasted that from my code,  
session[:language] makes no sense, this is all you should need:

\<%= @page.content -%\>

the “if @page” part may be useful if you’re not sure, that the query  
will return something

---

<div class="post-metadata">

**Author:** ![dhaval\_parikh33](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/bcef8e/32.png) [@dhaval\_parikh33](https://www.ruby-forum.com/u/dhaval_parikh33)\
**Post date:** [February 18, 2008, 1:28pm UTC](https://www.ruby-forum.com/t/issue-with-fckeditor/129402/5 "2008-02-18T13:28:53Z")

</div>

Thorsten M. wrote:

> sorry, copy pasted that from my code,  
> session[:language] makes no sense, this is all you should need:
> 
> \<%= @page.content -%\>
> 
> the “if @page” part may be useful if you’re not sure, that the query  
> will return something

ok thanks it works
