<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Scott Rutherford &#187; javascript</title>
	<atom:link href="http://blog.thatsuseful.com/tag/javascript/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.thatsuseful.com</link>
	<description>Life on and off the Rails</description>
	<lastBuildDate>Wed, 21 Jul 2010 16:35:05 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Kropper</title>
		<link>http://blog.thatsuseful.com/2007/12/20/kropper/</link>
		<comments>http://blog.thatsuseful.com/2007/12/20/kropper/#comments</comments>
		<pubDate>Thu, 20 Dec 2007 12:43:00 +0000</pubDate>
		<dc:creator>Scott</dc:creator>
				<category><![CDATA[Home]]></category>
		<category><![CDATA[Rails]]></category>
		<category><![CDATA[images]]></category>
		<category><![CDATA[javascript]]></category>

		<guid isPermaLink="false">http://blog.caronsoftware.com/2007/12/20/kropper</guid>
		<description><![CDATA[I was looking for a neat way to crop images last night and had originally planned to use the excellent jsCropper library from Dave Spurr, which I have used on projects before. When, during a bit of googling about I came across Kropper from Jonathon Wolke. It takes a slightly different approach to Cropper with [...]]]></description>
			<content:encoded><![CDATA[<p>I was looking for a neat way to crop images last night and had originally planned to use the excellent <a href="http://www.defusion.org.uk/code/javascript-image-cropper-ui-using-prototype-scriptaculous/">jsCropper library</a> from <a href="http://www.defusion.org.uk/">Dave Spurr</a>, which I have used on projects before. When, during a bit of googling about I came across <a href="http://kropper.captchr.com/about">Kropper</a> from <a href="http://www.kolossus.com/">Jonathon Wolke</a>. It takes a slightly different approach to Cropper with the crop area staying put and the image moving under the crop area, but also includes a neat zooming feature and some pretty slick design. Another plus, from a Rails perspective, is that the code comes in an example Rails app!!! Makes it very easy to integrate.</p>
<p><img src="http://blog.caronsoftware.com/assets/2007/12/20/kropper_screenshot.jpg" alt="" /></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.thatsuseful.com/2007/12/20/kropper/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>FCKeditor Demo</title>
		<link>http://blog.thatsuseful.com/2006/12/28/fckeditor-demo/</link>
		<comments>http://blog.thatsuseful.com/2006/12/28/fckeditor-demo/#comments</comments>
		<pubDate>Thu, 28 Dec 2006 06:02:07 +0000</pubDate>
		<dc:creator>Scott</dc:creator>
				<category><![CDATA[FCKeditor]]></category>
		<category><![CDATA[Home]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[Rails]]></category>

		<guid isPermaLink="false">http://blog.caronsoftware.com/2007/11/25/fckeditor-demo</guid>
		<description><![CDATA[I have been asked a few times for the code for the FCKeditor demo. So I thought I would put it up here for anyone to download, and by here I mean here. The tar includes the fckeditor plugin, the ajax scaffold plugin and the bits to get them working together. You will need to [...]]]></description>
			<content:encoded><![CDATA[<p>I have been asked a few times for the code for the <a href="http://fckeditor.caronsoftware.com">FCKeditor  demo</a>. So I thought I would put it up here for anyone to download, and by here I mean <a href="/files/fckeditor_demo.tar.gz">here</a>.</p>
<p>The tar includes the fckeditor plugin, the ajax scaffold plugin and the bits to get them working together. You will need to create a db and update the config files though.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.thatsuseful.com/2006/12/28/fckeditor-demo/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>FCKeditor and FireFox</title>
		<link>http://blog.thatsuseful.com/2006/12/18/fckeditor-and-firefox/</link>
		<comments>http://blog.thatsuseful.com/2006/12/18/fckeditor-and-firefox/#comments</comments>
		<pubDate>Mon, 18 Dec 2006 09:18:59 +0000</pubDate>
		<dc:creator>Scott</dc:creator>
				<category><![CDATA[FCKeditor]]></category>
		<category><![CDATA[Home]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[Rails]]></category>

		<guid isPermaLink="false">http://blog.caronsoftware.com/2007/11/25/fckeditor-and-firefox</guid>
		<description><![CDATA[A few people have said they have been having problems with the text area not appearing in Firefox. This isn&#8217;t a problem I have had but for those of you who have, thanks to James Penny there is a solution&#8230;.. Simply add something like :width =&#62; ‘400’, :height =&#62; ‘200’ to the fckeditor_textarea call and [...]]]></description>
			<content:encoded><![CDATA[<p>A few people have said they have been having problems with the text area not appearing in Firefox. This isn&#8217;t a problem I have had but for those of you who have, thanks to James Penny there is a solution&#8230;..</p>
<p>Simply add something like :width =&gt; ‘400’, :height =&gt; ‘200’ to the fckeditor_textarea call and you should get the editor appearing as expected. Obviously you can change the dimensions to suite your needs.</p>
<p>The solution also explains why I never saw the issue &#8211; I have always had the dimensions specified&#8230;&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.thatsuseful.com/2006/12/18/fckeditor-and-firefox/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>FCKeditor 0.4.0 Released</title>
		<link>http://blog.thatsuseful.com/2006/12/03/fckeditor-0-4-0-released/</link>
		<comments>http://blog.thatsuseful.com/2006/12/03/fckeditor-0-4-0-released/#comments</comments>
		<pubDate>Sun, 03 Dec 2006 10:37:29 +0000</pubDate>
		<dc:creator>Scott</dc:creator>
				<category><![CDATA[FCKeditor]]></category>
		<category><![CDATA[Home]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[Rails]]></category>

		<guid isPermaLink="false">http://blog.caronsoftware.com/2007/11/25/fckeditor-0-4-0-released</guid>
		<description><![CDATA[I released a new version of the FCKeditor plugin today. It contains a couple of changes to the controller to fix a potential security issue and also a remote_form_for helper so that now you can do this: &#60;% fckeditor_remote_form_for :note, :url =&#62; @options.merge(:controller =&#62; 'notes'), :editors =&#62; { :note =&#62; ['text'] } do &#124;f&#124; %&#62; [...]]]></description>
			<content:encoded><![CDATA[<p>I released a new version of the FCKeditor plugin today. It contains a couple of changes to the controller to fix a potential security issue and also a remote_form_for helper so that now you can do this:</p>
<pre>
&lt;% fckeditor_remote_form_for :note,
                             :url =&gt; @options.merge(:controller =&gt; 'notes'),
                             :editors =&gt; { :note =&gt; ['text'] } do |f| %&gt;
  &lt;%= fckeditor_textarea( "note", "text", :ajax =&gt; true )
&lt;% end %&gt;
</pre>
<p>You still need to use the original fckeditor_textarea call as as of yet there is no f.fckeditor_textarea method.</p>
<p>I am currently trying to add a check for IsDirty to prevent accidental unloading of the editor and also looking at using the FCKeditor_IsCompatibleBrowser() function to degrade gracefully.</p>
<p>N.B If you are upgrading you will need to delete the public/javascripts/fckeditor directory <strong>before</strong> reinstalling&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.thatsuseful.com/2006/12/03/fckeditor-0-4-0-released/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>FCKeditor 0.3.2 Released</title>
		<link>http://blog.thatsuseful.com/2006/10/02/fckeditor-0-3-2-released/</link>
		<comments>http://blog.thatsuseful.com/2006/10/02/fckeditor-0-3-2-released/#comments</comments>
		<pubDate>Mon, 02 Oct 2006 10:29:45 +0000</pubDate>
		<dc:creator>Scott</dc:creator>
				<category><![CDATA[FCKeditor]]></category>
		<category><![CDATA[Home]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[Rails]]></category>

		<guid isPermaLink="false">http://blog.caronsoftware.com/2007/11/25/fckeditor-0-3-2-released</guid>
		<description><![CDATA[This release tidies up some of the things I thought I&#8217;d got right with the last one, doh. However, it turns out I had overlooked the paths for the spell check and the resource manager. Both of these now dynamically configure so that you can place your install anywhere you fancy. Unfortunately there is a [...]]]></description>
			<content:encoded><![CDATA[<p>This release tidies up some of the things I thought I&#8217;d got right with the last one, doh. However, it turns out I had overlooked the paths for the spell check and the resource manager. Both of these now dynamically configure so that you can place your install anywhere you fancy. Unfortunately there is a single piece of configuration now required, if, and only if your app is hosted away from the root of the server.</p>
<p>            <span id="more-37"></span></p>
<p>If you already have the plugin installed you will need to move the rename the fckcustom.js file in /public to something else, resinstall the plugin and then copy any changes you made in the config over. Then while you have the fckcustom.js file open simply change this line:</p>
<pre>
FCKRelativePath = '';
</pre>
<p>to suit your needs.</p>
<p>For example if your app is hosted at:</p>
<pre>

http://www.mydomain.com/myapp
</pre>
<p>Then this line should read:</p>
<pre>
FCKRelativePath = '/myapp';
</pre>
<p>And that (hopefully) should be that&#8230;&#8230;.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.thatsuseful.com/2006/10/02/fckeditor-0-3-2-released/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>FCKeditor 0.3.1 Released</title>
		<link>http://blog.thatsuseful.com/2006/09/27/fckeditor-0-3-1-released/</link>
		<comments>http://blog.thatsuseful.com/2006/09/27/fckeditor-0-3-1-released/#comments</comments>
		<pubDate>Wed, 27 Sep 2006 10:00:33 +0000</pubDate>
		<dc:creator>Scott</dc:creator>
				<category><![CDATA[FCKeditor]]></category>
		<category><![CDATA[Home]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[Rails]]></category>

		<guid isPermaLink="false">http://blog.caronsoftware.com/2007/11/25/fckeditor-0-3-1-released</guid>
		<description><![CDATA[This release fixes an issue with the base path to the editor being hardcoded into the helper. The problem arose when hosting an app using named virtual hosts and aliases. e.g. hosting your app at www.mydomain.com/scotts/railsapp instead of www.mydomain.com/railsapp. This should now all work&#8230;&#8230;..]]></description>
			<content:encoded><![CDATA[<p>This release fixes an issue with the base path to the editor being hardcoded into the helper. The problem arose when hosting an app using named virtual hosts and aliases. e.g. hosting your app at www.mydomain.com/scotts/railsapp instead of www.mydomain.com/railsapp.</p>
<p>This should now all work&#8230;&#8230;..</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.thatsuseful.com/2006/09/27/fckeditor-0-3-1-released/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>FCKeditor 0.3.0 Released</title>
		<link>http://blog.thatsuseful.com/2006/09/21/fckeditor-0-3-0-released/</link>
		<comments>http://blog.thatsuseful.com/2006/09/21/fckeditor-0-3-0-released/#comments</comments>
		<pubDate>Thu, 21 Sep 2006 16:26:50 +0000</pubDate>
		<dc:creator>Scott</dc:creator>
				<category><![CDATA[FCKeditor]]></category>
		<category><![CDATA[Home]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[Rails]]></category>

		<guid isPermaLink="false">http://blog.caronsoftware.com/2007/11/25/fckeditor-0-3-0-released</guid>
		<description><![CDATA[There is a new version of the FCKeditor plugin up. This fixes a problem I found when running tests. The alias method in the init.rb file was being called for every test and causing an infinite recursion. The README has also been fixed to remove the various typos people have found (thanks for the feedback). [...]]]></description>
			<content:encoded><![CDATA[<p>There is a new version of the FCKeditor plugin up. This fixes a problem I found when running tests. The alias method in the init.rb file was being called for every test and causing an infinite recursion. The <span class="caps">README</span> has also been fixed to remove the various typos people have found (thanks for the feedback).</p>
<p>As before you can get the plugin using:</p>
<pre>
ruby script/plugin install svn://rubyforge.org/var/svn/fckeditorp/trunk/fckeditor
</pre>
<p>There is also a <a href="http://fckeditor.caronsoftware.com">demo</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.thatsuseful.com/2006/09/21/fckeditor-0-3-0-released/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>FCKeditor Plugin 0.2.3 Released</title>
		<link>http://blog.thatsuseful.com/2006/09/11/fckeditor-plugin-0-2-3-released/</link>
		<comments>http://blog.thatsuseful.com/2006/09/11/fckeditor-plugin-0-2-3-released/#comments</comments>
		<pubDate>Mon, 11 Sep 2006 06:05:44 +0000</pubDate>
		<dc:creator>Scott</dc:creator>
				<category><![CDATA[FCKeditor]]></category>
		<category><![CDATA[Home]]></category>
		<category><![CDATA[ajax]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[Rails]]></category>

		<guid isPermaLink="false">http://blog.caronsoftware.com/2007/11/25/fckeditor-plugin-0-2-3-released</guid>
		<description><![CDATA[This release is basically a bug fix. The only really change is to apply the patch kindly provided by Nicola Piccinini which sorts out an issue with file upload from inside the resource manager. There are a couple of other changes to do with the install and version numbers, but that is all internal to [...]]]></description>
			<content:encoded><![CDATA[<p>This release is basically a bug fix. The only really change is to apply the patch kindly provided by <a href="http://superfluo.org">Nicola Piccinini</a> which sorts out an issue with file upload from inside the resource manager.</p>
<p>There are a couple of other changes to do with the install and version numbers, but that is all internal to the plugin.</p>
<p><a href="http://fckeditor.caronsoftware.com">demo</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.thatsuseful.com/2006/09/11/fckeditor-plugin-0-2-3-released/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>FCKeditor Plugin 0.2.2 Released</title>
		<link>http://blog.thatsuseful.com/2006/09/08/fckeditor-plugin-0-2-2-released/</link>
		<comments>http://blog.thatsuseful.com/2006/09/08/fckeditor-plugin-0-2-2-released/#comments</comments>
		<pubDate>Fri, 08 Sep 2006 09:22:44 +0000</pubDate>
		<dc:creator>Scott</dc:creator>
				<category><![CDATA[FCKeditor]]></category>
		<category><![CDATA[Home]]></category>
		<category><![CDATA[ajax]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[Rails]]></category>

		<guid isPermaLink="false">http://blog.caronsoftware.com/2007/11/25/fckeditor-plugin-0-2-2-released</guid>
		<description><![CDATA[There is a new version of the FCKeditor Rails plugin available details of how to get it and a demo are here. This version fixes a problem with having multiple editors open at once on the same page and also adds a helper to allow multiple editors on the same Ajax form. This also now [...]]]></description>
			<content:encoded><![CDATA[<p>There is a new version of the FCKeditor Rails plugin available details of how to get it and a demo are <a href="http://fckeditor.caronsoftware.com">here</a>.</p>
<p>This version fixes a problem with having multiple editors open at once on the same page and also adds a helper to allow multiple editors on the same Ajax form. This also now works with static html forms but you can just use the standard form helpers for that.</p>
<p>            <span id="more-28"></span></p>
<p>To create an ajax form using multiple editors use the fckeditor_form_remote_tag helper and pass the :editors option. This takes an hash of model symbol keys with each having an array as its value. The array should contain the list of fields that will have editors attached to them.</p>
<pre>
&lt;%= fckeditor_form_remote_tag :url =&gt; some_great_url,
     :editors =&gt; { :multinote =&gt; ['text1', 'text2'] } %&gt;

    &lt;%= fckeditor_textarea( "multinote", "text1", :ajax =&gt; true ) %&gt;
    &lt;%= fckeditor_textarea( "multinote", "text2", :ajax =&gt; true ) %&gt;

&lt;%= end_form_tag %&gt;
</pre>
<p>You can of course use the same helper for a single editor or for static html forms as it is a bit neater than having to declare the :before javascript method yourself.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.thatsuseful.com/2006/09/08/fckeditor-plugin-0-2-2-released/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>FCKeditor Plugin 0.2.1 Released</title>
		<link>http://blog.thatsuseful.com/2006/08/26/fckeditor-plugin-0-2-1-released/</link>
		<comments>http://blog.thatsuseful.com/2006/08/26/fckeditor-plugin-0-2-1-released/#comments</comments>
		<pubDate>Sat, 26 Aug 2006 07:48:23 +0000</pubDate>
		<dc:creator>Scott</dc:creator>
				<category><![CDATA[FCKeditor]]></category>
		<category><![CDATA[Home]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[Rails]]></category>

		<guid isPermaLink="false">http://blog.caronsoftware.com/2007/11/25/fckeditor-plugin-0-2-1-released</guid>
		<description><![CDATA[I&#8217;ve just released the next version of the FCKeditor plugin. The main change in this version is the addition of the spell check functionality using ASpell. A big thank you to Ken Pratt for providing the patch for that and at the same time providing a solution (I hope) to the routing issues that some [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve just released the next version of the FCKeditor plugin. The main change in this version is the addition of the spell check functionality using ASpell. A big thank you to <a href="http://www.kenpratt.net">Ken Pratt</a> for providing the patch for that and at the same time providing a solution (I hope) to the routing issues that some people have had.</p>
<p>If you already have this plugin installed you can upgrade by just deleting the existing install and getting it again. If you have altered the fckcustom.js file then you will need to add:</p>
<pre>
FCKConfig.SpellChecker = 'SpellerPages';
</pre>
<p>to it . If not just delete that too before reinstalling. You also need to be sure that <a href="http://www.aspell.net">ASpell</a> is installed along with any dictionaries you want to use (If you are on windows check the <span class="caps">README</span> for the expected install directory).</p>
<p>            <span id="more-22"></span></p>
<p>Basically we (well he, I just extended it a bit) added the following to init.rb to add the required routes on startup:</p>
<pre>
# add a route for spellcheck
class ActionController::Routing::RouteSet
  alias draw_without_spelling draw
  def draw_with_spelling
    draw_without_spelling do |map|
      map.connect 'fckeditor/check_spelling', :controller =&gt; 'fckeditor', :action =&gt; 'check_spelling'
      map.connect 'fckeditor/command', :controller =&gt; 'fckeditor', :action =&gt; 'command'
      map.connect 'fckeditor/upload', :controller =&gt; 'fckeditor', :action =&gt; 'upload'
      yield map
    end
  end
  alias draw draw_with_spelling
end
</pre>
<p>The Flash upload should now also be working. It is worth noting that images are now uploaded to uploads/Image and flash movies to uploads/Flash. This means that you will need to either copy any existing images to the Image dir (so all existing posts continue to work) or move them (which&#8217;ll break any existing uses).</p>
<p>There is still an issue with the refreshing of the resource manager after a file upload from within it, but the upload does function.</p>
<p>Oh, and the extra #{value} has been removed thanks to x0n for pointing that out.</p>
<p>There is also an updated <a href="http://fckeditor.caronsoftware.com">demo</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.thatsuseful.com/2006/08/26/fckeditor-plugin-0-2-1-released/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
