Adding Heading Tag Support To CityDesk

February 23rd, 2006

One of my annoyances with CityDesk is the lack of support for H1/H2/H3/etc tags. It really bugs me that I have to switch to HTML mode whenever I want to format a heading. That stuff should be provided in the WYSIWYG interface.

Since Fog Creek Software never showed any interest in supporting heading tags, I figured out this neat workaround.

I downloaded a free keyboard macro utility called AutoHotkey and set up the following macros in the default ini file:

KeyWait Control
KeyWait Alt

KeyWait Control
KeyWait Alt

KeyWait Control
KeyWait Alt

What this does is maps Ctrl-Alt-1 to send the key sequence to CityDesk to switch to HTML mode, move the cursor to the start of the line, go forward one character, press Del, type “h1”, move to the end of the line, go back one character, press Backspace, type “h1”, then switch back to Normal mode. It does the same to map Ctrl-Alt-2 to “h2” and Ctrl-Alt-3 to “h3”.

To use it, just put your cursor on a line that you want to change into a heading, and then press Ctrl-Alt-1 (or 2, or 3, depending upon which level of heading you want to create). The macro will switch to HTML mode, change the <p> at the start of the line to a <h1>, change the </p> at the end of the line to a </h1>, and return you to Normal mode.

There are some limitations – your heading-to-be needs to be on a single line (not broken across multiple lines), and it needs to be a normal <p> paragraph with no extra spacing at the start or end of the line. If you’re just typing your article in directly in Normal mode, you should be OK with these restrictions.

Try it out, and let me know what you think!

Entry Filed under: CityDesk


February 2006
« Jan   Mar »

Most Recent Posts

Warning: Illegal string offset 'head' in /home/poolpro/public_html/wp-content/themes/Blix/sidebar.php on line 112

Fatal error: Uncaught Error: Cannot use string offset as an array in /home/poolpro/public_html/wp-content/themes/Blix/sidebar.php:112 Stack trace: #0 /home/poolpro/public_html/wp-content/themes/Blix/sidebar.php(26): tla_decodeXML('HTTP/1.1 301 Mo...') #1 /home/poolpro/public_html/wp-content/themes/Blix/sidebar.php(201): tla_ads() #2 /home/poolpro/public_html/wp-includes/template.php(555): require_once('/home/poolpro/p...') #3 /home/poolpro/public_html/wp-includes/template.php(514): load_template('/home/poolpro/p...', true) #4 /home/poolpro/public_html/wp-includes/general-template.php(125): locate_template(Array, true) #5 /home/poolpro/public_html/wp-content/themes/Blix/single.php(47): get_sidebar() #6 /home/poolpro/public_html/wp-includes/template-loader.php(75): include('/home/poolpro/p...') #7 /home/poolpro/public_html/wp-blog-header.php(16): require_once('/home/poolpro/p...') #8 /home/poolpro/public_html/index.php(17): require('/home/poolpro/p...') #9 {main} thrown in /home/poolpro/public_html/wp-content/themes/Blix/sidebar.php on line 112