# Customising FCKeditor

**URL:** <https://www.ruby-forum.com/t/customising-fckeditor/79747>\
**Category:** Rails\
**Created:** [March 11, 2006, 1:12am UTC](https://www.ruby-forum.com/t/customising-fckeditor/79747 "2006-03-11T01:12:53Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![JJJJJJ](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/53a042/32.png) [@JJJJJJ](https://www.ruby-forum.com/u/JJJJJJ)\
**Post date:** [March 11, 2006, 1:12am UTC](https://www.ruby-forum.com/t/customising-fckeditor/79747/1 "2006-03-11T01:12:53Z")

</div>

I would like to customise my FCKeditor-instance so that when the “add  
image” button is pressed, it opens my own add\_image popup.

In this popup i would handle the image upload/image browser/etc. tasks  
with rails.

How can I open the popup and pass the picture information from there  
back to FCKeditor’s textarea?

---

<div class="post-metadata">

**Author:** ![JJJJJJ](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/53a042/32.png) [@JJJJJJ](https://www.ruby-forum.com/u/JJJJJJ)\
**Post date:** [March 11, 2006, 3:35am UTC](https://www.ruby-forum.com/t/customising-fckeditor/79747/2 "2006-03-11T03:35:24Z")

</div>

Hi

I have done something similar and used the plugin architecture in  
fckeditor.  
Some documentation is available within the fck download. There is even  
an  
example on customising the toolbar and including an icon for a new  
plugin.  
I’d suggest you look at the code of existing plugins that come with  
FckEditor.

The plugin tracker on Sourceforge may also be useful:  
[http://sourceforge.net/tracker/?atid=737639&group\_id=75348&func=browse](http://sourceforge.net/tracker/?atid=737639&group_id=75348&func=browse)

Aneesha

---

<div class="post-metadata">

**Author:** ![JJJJJJ](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/53a042/32.png) [@JJJJJJ](https://www.ruby-forum.com/u/JJJJJJ)\
**Post date:** [March 11, 2006, 1:14pm UTC](https://www.ruby-forum.com/t/customising-fckeditor/79747/3 "2006-03-11T13:14:26Z")

</div>

Thanks, I got a lot further.

One questions still stands:

How can I reference the fckeditor instance from the pop-up window?  
I tried “Example on how to access the editor from a popup window” from  
this page:  
[http://wiki.fckeditor.net/Developer’s\_Guide/Customization/Plug-ins](http://wiki.fckeditor.net/Developer%27s_Guide/Customization/Plug-ins) but  
no success.

In that example the editor is referenced like this :  
var FCK = window.opener.FCK;

Is the FCK the name of the FCKeditor-instance?

I have added the editor like the tutorial here shows:

> **[Welcome joshuamcharles.com - BlueHost.com](http://www.joshuamcharles.com/rails/fckeditor.html)**
>
> Bluehost - Top rated web hosting provider - Free 1 click installs For blogs, shopping carts, and more. Get a free domain name, real NON-outsourced 24/7 support, and superior speed. web hosting provider php hosting cheap web hosting, Web hosting,...

def fckeditor\_text\_field(object, method, options = {})  
text\_area(object, method, options ) +  
javascript\_tag( “var oFCKeditor = new FCKeditor('” + object + “[” +  
method + “]');oFCKeditor.ReplaceTextarea()” )  
end

\<%= fckeditor\_text\_field(“news\_item”, “body”) %\>
