<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://rt-wiki.bestpractical.com/index.php?action=history&amp;feed=atom&amp;title=AutomaticTextareaAutosave</id>
	<title>AutomaticTextareaAutosave - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://rt-wiki.bestpractical.com/index.php?action=history&amp;feed=atom&amp;title=AutomaticTextareaAutosave"/>
	<link rel="alternate" type="text/html" href="https://rt-wiki.bestpractical.com/index.php?title=AutomaticTextareaAutosave&amp;action=history"/>
	<updated>2026-08-22T08:28:55Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.41.1</generator>
	<entry>
		<id>https://rt-wiki.bestpractical.com/index.php?title=AutomaticTextareaAutosave&amp;diff=312&amp;oldid=prev</id>
		<title>Admin: 2 revisions imported</title>
		<link rel="alternate" type="text/html" href="https://rt-wiki.bestpractical.com/index.php?title=AutomaticTextareaAutosave&amp;diff=312&amp;oldid=prev"/>
		<updated>2016-04-06T20:03:19Z</updated>

		<summary type="html">&lt;p&gt;2 revisions imported&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;A number of my colleagues have a 5 button mouse where the &amp;#039;thumb-button&amp;#039; is mapped to Back. I hear the cries of despair when they accidentally click this after spending 20 minutes working on a ticket ... This adds an automatic autosave to the comment/reply textarea of RT.&lt;br /&gt;
&lt;br /&gt;
You will need a) Windows b) Firefox with the Save Text Area extension - https://addons.mozilla.org/en-US/firefox/addon/1046&lt;br /&gt;
&lt;br /&gt;
 - Ensure you have a directory C:\temp&lt;br /&gt;
 - Open a new tab in Firefox, enter about:config in the location bar and edit the following&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot;&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| Name&lt;br /&gt;
| Value&lt;br /&gt;
| Purpose&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| extensions.savetextarea.autosave-delay&lt;br /&gt;
| 60&lt;br /&gt;
| autosave every 60 seconds (you don’t have to change this, but I think the default 5 minutes is too long)&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| extensions.savetextarea.enable-attributes&lt;br /&gt;
| true&lt;br /&gt;
| make it so&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
|extensions.savetextarea.allow-attributes-from|https://your.rt.com/|The machines to trust. Please read the Save Text Area notes about this setting|&lt;br /&gt;
&lt;br /&gt;
You also need to modify RT:&lt;br /&gt;
&lt;br /&gt;
 $ pwd&lt;br /&gt;
 /usr/local/share/request-tracker3.4/html/Elements&lt;br /&gt;
 &lt;br /&gt;
 $ diff -d MessageBox.pre_autosave MessageBox&lt;br /&gt;
 &amp;amp;lt; &amp;amp;lt;textarea class=&amp;quot;messagebox&amp;quot; cols=&amp;quot;&amp;amp;lt;%$Width%&amp;amp;gt;&amp;quot; rows=&amp;quot;&amp;amp;lt;%$Height%&amp;amp;gt;&amp;quot; wrap=&amp;quot;&amp;amp;lt;%$Wrap%&amp;amp;gt;&amp;quot; name=&amp;quot;&amp;amp;lt;%$Name%&amp;amp;gt;&amp;quot;&amp;amp;gt;&amp;amp;lt;&amp;amp;amp; /Element&lt;br /&gt;
&lt;br /&gt;
s/Callback, %ARGS &amp;amp;amp;&amp;amp;gt;&amp;amp;lt;% $Default %&amp;amp;gt;&amp;amp;lt;%$message%&amp;amp;gt;&amp;amp;lt;%$[[IncludeSignature]]&amp;lt;nowiki&amp;gt; ? $signature : &amp;#039;&amp;#039;%&amp;amp;gt;&amp;amp;lt;/textarea&amp;amp;gt; &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 ---&lt;br /&gt;
 &amp;amp;gt; &amp;amp;lt;textarea class=&amp;quot;messagebox&amp;quot; cols=&amp;quot;&amp;amp;lt;%$Width%&amp;amp;gt;&amp;quot; rows=&amp;quot;&amp;amp;lt;%$Height%&amp;amp;gt;&amp;quot; wrap=&amp;quot;&amp;amp;lt;%$Wrap%&amp;amp;gt;&amp;quot; name=&amp;quot;&amp;amp;lt;%$Name%&amp;amp;gt;&amp;quot; saveto=&amp;quot;c:\&lt;br /&gt;
&lt;br /&gt;
\temp\\RT-&amp;amp;lt;%$uniq_id%&amp;amp;gt;.txt&amp;quot; autosave=&amp;quot;yes&amp;quot;&amp;amp;gt;&amp;amp;lt;&amp;amp;amp; /Elements/Callback, %ARGS &amp;amp;amp;&amp;amp;gt;&amp;amp;lt;% $Default %&amp;amp;gt;&amp;amp;lt;%$message%&amp;amp;gt;&amp;amp;lt;%$[[IncludeSig]]&amp;lt;nowiki&amp;gt; nature ? $signature : &amp;#039;&amp;#039;%&amp;amp;gt;&amp;amp;lt;/textarea&amp;amp;gt; &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 50a51,53&lt;br /&gt;
 &amp;amp;gt; # get a unique number for save file&lt;br /&gt;
 &amp;amp;gt; my $uniq_id = rand(1000000);&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
Restart apache and away you go.&lt;br /&gt;
&lt;br /&gt;
Whatever text is in the textarea of your comment/reply will be periodically saved according to the value you gave for autosave-delay. It is saved in a file with a name something like C:\temp\RT-118630.87127836.txt. Change the saveto parameter in [[MessageBox]] to call it something else, or save it somewhere else.&lt;br /&gt;
&lt;br /&gt;
If you’ve just lost your work:&lt;br /&gt;
&lt;br /&gt;
 - Start-&amp;amp;gt;Run and enter c:\temp&lt;br /&gt;
 - sort the directory display by Date Modified&lt;br /&gt;
 - find the newest RT-* file&lt;br /&gt;
 - in RT, open the ticket you were working on&lt;br /&gt;
 - click Comment or Reply&lt;br /&gt;
 - press Ctrl + Shift + L (or right-click and select Text-&amp;amp;gt;Load) and select the file you picked in 3 above&lt;br /&gt;
 - voila! you shouldn’t have lost more than a minute’s work.&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
There is no mechanism to clear out old files; depending on the number and size of comments/replies you make, you should remove old C:\temp\RT-* files periodically.&lt;/div&gt;</summary>
		<author><name>Admin</name></author>
	</entry>
</feed>