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? -- Posted via http://www.ruby-forum.com/.
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 Aneesha On 3/11/06, JJ <kerkkoj@hotmail.com> wrote:> > 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? > > -- > Posted via http://www.ruby-forum.com/. > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails >-- Aneesha -------------- next part -------------- An HTML attachment was scrubbed... URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060311/dec3128c/attachment.html
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%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: http://www.joshuamcharles.com/rails/fckeditor.html 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") %> -- Posted via http://www.ruby-forum.com/.