<?xml version="1.0" encoding="iso-8859-1"?> 
<rdf:RDF
	xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" 
	xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
	xmlns:dc="http://purl.org/dc/elements/1.1/" 
	xmlns:dcterms="http://purl.org/dc/terms/" 
	xmlns:admin="http://webns.net/mvcb/"
	xmlns:thr="http://purl.org/rss/1.0/modules/threading/"
	xmlns:pb="http://www.ideaspace.net/users/wkearney/schema/postback/" 
	xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" 
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	xmlns:mt="http://movabletype.org/"
	xmlns:foaf="http://xmlns.com/foaf/0.1/" 
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:html="http://www.w3.org/TR/REC-html40/"
	xmlns="http://purl.org/rss/1.0/"
> 

<rdf:Description rdf:about="http://www.ideaspace.net/users/wkearney/archives/entries/000220.html"> 
	<title>Buttons in MT editor</title>
	<link>http://www.ideaspace.net/users/wkearney/archives/entries/000220.html</link>
	<description>I&apos;m in the process of integrating a better text editor into MovableType&apos;s templates.  But in the interim I&apos;ve found a very simple way to add one or two buttons that really help.</description> 

	<dc:creator>wkearney</dc:creator> 
	<dc:date>2003-04-03T12:05:28-05:00</dc:date> 
	<dc:identifier>http://www.ideaspace.net/users/wkearney/archives/entries/000220.html</dc:identifier>
	<dc:language>en-us</dc:language>

	 
	<dc:subject>Hacks</dc:subject>

	

	

	
	
	
	<dcterms:abstract>I&apos;m in the process of integrating a better text editor into MovableType&apos;s templates.  But in the interim I&apos;ve found a very simple way to add one or two buttons that really help.</dcterms:abstract> 
	<dcterms:created>2003-04-03T12:05:28-05:00</dcterms:created> 
	<dcterms:isPartOf rdf:resource="http://www.ideaspace.net/users/wkearney/" /> 

	<mt:body><![CDATA[<p>I'm in the process of integrating a better text editor into MovableType's templates.  But in the interim I've found a very simple way to add one or two buttons that really help.</p>]]></mt:body>
	<mt:excerpt>I&apos;m in the process of integrating a better text editor into MovableType&apos;s templates.  But in the interim I&apos;ve found a very simple way to add one or two buttons that really help.</mt:excerpt> 
	<mt:more><![CDATA[<p>First you'll want to get two picture files I've created.  One is for a blockquote button and the other for a paragraph.  They're available online in my <a href="http://www.ideaspace.net/mt-static/images/">images</a> directory or from here: <img src="http://www.ideaspace.net/mt-static/images/blockquote-button.gif" border="0"> and <img src="http://www.ideaspace.net/mt-static/images/p-button.gif" border="0">.</p>

<p>Save them into the same place as your other MT icons images.  This location is within the <b>StaticWebPath</b>/images/ directory of your MT installation.   If you're not sure, root around your MT web server install and find the file 'bold-button-gif' and save these two with it.</p>

<p>Now that the images are available you'll need to edit your templates.  I've only edited two templates, the main entry and the bookmarklet entry forms.  There may well be others suitable for similar editing but this is enough for me.</p>

<blockquote><b>IMPORTANT NOTE</b>: my edited templates are for MovableType version 2.63.  If you're not using MT 2.63 then <b>DO NOT</b> simply drop in my edited templates.  Open you own template files, find the section and add the lines. Upgrading MT is <i>very</i> easy and was absolutely smooth.  Seriously look at upgrading if you're not using the latest version.</blockquote>

<p>You'll need to first edit the edit_entry.tmpl file.  My already edited version can be found <a href="http://www.ideaspace.net/mt/tmpl/cms/edit_entry.tmpl">here</a>.  What you want to do is find this section: (<i>Note: these are really wide lines of text.  You might want to copy/paste them into a text editor in order to avoid line wrapping shenanigans.</i>)<br />
<blockquote><font size="-4">&lt;script language="javascript"&gt;<br />
if (document.selection) {<br />
    document.write('&lt;table border="0" cellspacing="0" cellpadding="0" width="107"&gt;');<br />
    document.write('&lt;tr&gt;');<br />
    document.write('&lt;td width="24"&gt;&lt;a href="javascript:formatStr(\'blockquote\')"&gt;&lt;img src="&lt;TMPL_VAR NAME=STATIC_URI&gt;images/blockquote-button.gif" alt="blockquote" width="24" height="18" border="0"&gt;&lt;/a&gt;&lt;/td&gt;');<br />
    document.write('&lt;td width="24"&gt;&lt;a href="javascript:formatStr(\'b\')"&gt;&lt;img src="&lt;TMPL_VAR NAME=STATIC_URI&gt;images/bold-button.gif" alt="bold" width="24" height="18" border="0"&gt;&lt;/a&gt;&lt;/td&gt;');<br />
    document.write('&lt;td width="24"&gt;&lt;a href="javascript:formatStr(\'i\')"&gt;&lt;img src="&lt;TMPL_VAR NAME=STATIC_URI&gt;images/italic-button.gif" alt="italic" width="24" height="18" border="0"&gt;&lt;/a&gt;&lt;/td&gt;');<br />
    document.write('&lt;td width="24"&gt;&lt;a href="javascript:formatStr(\'u\')"&gt;&lt;img src="&lt;TMPL_VAR NAME=STATIC_URI&gt;images/underline-button.gif" alt="underline" width="24" height="18" border="0"&gt;&lt;/a&gt;&lt;/td&gt;');<br />
    document.write('&lt;td width="24"&gt;&lt;a href="javascript:formatStr(\'p\')"&gt;&lt;img src="&lt;TMPL_VAR NAME=STATIC_URI&gt;images/p-button.gif" alt="underline" width="24" height="18" border="0"&gt;&lt;/a&gt;&lt;/td&gt;');<br />
    document.write('&lt;td width="26"&gt;&lt;a href="javascript:insertLink()"&gt;&lt;img src="&lt;TMPL_VAR NAME=STATIC_URI&gt;images/url-button.gif" alt="link" width="26" height="18" border="0"&gt;&lt;/a&gt;&lt;/td&gt;');<br />
    document.write('&lt;/tr&gt;');<br />
    document.write('&lt;/table&gt;');<br />
} else {<br />
    document.write('&nbsp;');<br />
}<br />
&lt;/script&gt;</font></blockquote></p>

<p>And add these two lines:<br />
<blockquote><font size="-4">&lt;script language="javascript"&gt;<br />
if (document.selection) {<br />
    document.write('&lt;table border="0" cellspacing="0" cellpadding="0" width="107"&gt;');<br />
    document.write('&lt;tr&gt;');<br />
<b>    document.write('&lt;td width="24"&gt;&lt;a href="javascript:formatStr(\'blockquote\')"&gt;&lt;img src="&lt;TMPL_VAR NAME=STATIC_URI&gt;images/blockquote-button.gif" alt="blockquote" width="24" height="18" border="0"&gt;&lt;/a&gt;&lt;/td&gt;');</b><br />
    document.write('&lt;td width="24"&gt;&lt;a href="javascript:formatStr(\'b\')"&gt;&lt;img src="&lt;TMPL_VAR NAME=STATIC_URI&gt;images/bold-button.gif" alt="bold" width="24" height="18" border="0"&gt;&lt;/a&gt;&lt;/td&gt;');<br />
    document.write('&lt;td width="24"&gt;&lt;a href="javascript:formatStr(\'i\')"&gt;&lt;img src="&lt;TMPL_VAR NAME=STATIC_URI&gt;images/italic-button.gif" alt="italic" width="24" height="18" border="0"&gt;&lt;/a&gt;&lt;/td&gt;');<br />
    document.write('&lt;td width="24"&gt;&lt;a href="javascript:formatStr(\'u\')"&gt;&lt;img src="&lt;TMPL_VAR NAME=STATIC_URI&gt;images/underline-button.gif" alt="underline" width="24" height="18" border="0"&gt;&lt;/a&gt;&lt;/td&gt;');<br />
<b>    document.write('&lt;td width="24"&gt;&lt;a href="javascript:formatStr(\'p\')"&gt;&lt;img src="&lt;TMPL_VAR NAME=STATIC_URI&gt;images/p-button.gif" alt="underline" width="24" height="18" border="0"&gt;&lt;/a&gt;&lt;/td&gt;');</b><br />
    document.write('&lt;td width="26"&gt;&lt;a href="javascript:insertLink()"&gt;&lt;img src="&lt;TMPL_VAR NAME=STATIC_URI&gt;images/url-button.gif" alt="link" width="26" height="18" border="0"&gt;&lt;/a&gt;&lt;/td&gt;');<br />
    document.write('&lt;/tr&gt;');<br />
    document.write('&lt;/table&gt;');<br />
} else {<br />
    document.write('&nbsp;');<br />
}<br />
&lt;/script&gt;</font></blockquote></p>

<p>Now go open the bm_entry.tmpl file, find the same section and add the same two lines.  My already edited version can be found <a href="http://www.ideaspace.net/mt/tmpl/cms/bm_entry.tmpl">here</a>.  </p>

<p>What this does is add two buttons, one for BL (blockquote) and P (paragraph).   I find it very handy to have these when doing any sort of complex editing.  The P button is especially useful when I have to turn off MT's convert line breaks function.</p>

<p>Give this a try and let me know if it works for you.  Meanwhile, I'll keep plugging way on a better editor...  stay tuned.</p>]]></mt:more>
	<mt:keywords></mt:keywords> 
	<mt:entryID>220</mt:entryID>

	<mt:entryPrev>219</mt:entryPrev>
	<mt:entryNext>221</mt:entryNext>

	<html:link rel="prev" type="application/xml" href="http://www.ideaspace.net/users/wkearney/archives/entries/000219.html.xml" title="Spring has sprung!" />
	<html:link rel="next" type="application/xml" href="http://www.ideaspace.net/users/wkearney/archives/entries/000221.html.xml" title="Protein Diets" />
	
	<mt:author>wkearney</mt:author> 
	<mt:authorNickname>Bill Kearney</mt:authorNickname> 
	<mt:authorEmail>wkearney@ideaspace.net</mt:authorEmail>
	<mt:authorURL rdf:resource="http://www.ideaspace.net/users/wkearney" /> 
	
	<foaf:name>wkearney</foaf:name> 
	<foaf:mbox rdf:resource="mailto:wkearney@ideaspace.net" /> 
	<foaf:nick>Bill Kearney</foaf:nick> 
	<foaf:homepage rdf:resource="http://www.ideaspace.net/users/wkearney" />
	
	<rdfs:seeAlso rdf:resource="http://www.ideaspace.net/users/wkearney/xml/index.rdf" />
	<admin:generatorAgent rdf:resource="http://www.movabletype.org/?v=2.64" /> 
</rdf:Description>
</rdf:RDF>