Fog Creek Software
Discussion Board




Knowledge Base
Documentation
Terry's Tips
Darren's Tips

[link, one-line break, link] problem

i've been using City Desk to start putting together a news weblog in the vein of Media News ( http://www.medianews.org ) and TV Tattle ( http://www.tvtattle.com ) and Obscure Store ( http://www.obscurestore.com ). needless to say, i spend a lot of time using the link inserter =)

sometimes i like to put links right on top of links, either as part of the blog or in a special links page as a jumping off point for my daily news scouring (like http://home.earthlink.net/~normanbw/tvlinki.html )

so in an article, i type up some text that will be my headline. then i click-drag to select the text (from the right-hand side, where my cursor is). then i click on the link inserter and fill in the URL (would be nice if the URL in the clipboard was inserted into the URL field for me, or at least if the default text in the URL field was automatically highlighted/selected, but that's another post). after i click "Insert," CD makes the link and moves my cursor down a couple of lines, as though i had hit Enter.

ahh, but i want links right on top of links, with only one line between -- a BR rather than a P, or a Shift-Enter in CD usage -- so i try hitting Backspace to get rid of the regular Enter (P tag, double line, whatever) and back up to the same line the link is on (so i can then hit Shift-Enter). ahh, but this seems to kill the link, which loses its underline and formatting as soon as my cursor arrives on its line. hit Undo, doesn't fix it.

OK, i've learned my lesson. delete everything, retype the headline, reselect and relink. this time, after my cursor is moved down too far by CD (remember, i want one line break not two, a BR not a P, a Shift-Enter not an Enter), i simply grab the mouse and position the cursor at the end of the link (which is also the end of that line). then i hit Shift-Enter.

then i start typing my next headline. but, hey -- it already looks like a link! hmm. i finish typing the headline. i click-drag to select all of the text on this line, insert a link. click preview. seems my two links have the same URL--when i hit Shift-Enter at the end of the first link, it simply extended the link to another line. then when i tried to "insert" a link over the second line, it actually retargeted both the first and second line (which CD believes to be one big link).

ack.

so my solution now is simply not to try and space links one line apart, which makes for easier clicking, really =) but i can think of certain circumstances where one would want links spaced only by a line -- both Media News and TV Tattle use such links extensively.

from my description, this bug might sound obtuse, but it is basically a problem of being unable to create a list of links spaced with Shift-Enters. thanks for listening

R

Ryan Tate
Saturday, December 22, 2001

actually, the link bug seems to happen even when i just accept CD's double-line break and start typing.

New article
Some text, hit enter
some more text, highlight and make into link
CD moves me down as though i had hit enter
start typing -- we're still in the link!

ack.

R

Ryan Tate
Saturday, December 22, 2001

here's what makes the bug not happen --

New article
Some text, hit enter
some more text, hit enter three times, return to line with text, highlight and make into link
CD positions my cursor at end of link on same line, and when i type i no longer get "link text"!

so this bug appears to be connected to the process of making a link out of text *at the end of the last line* of the CD Article -- in such cases, CD inserts a P break and makes all subsequent text part of the link.

Ryan Tate
Saturday, December 22, 2001

Its just the funky way that Microsoft's DHTMLEdit control works.

The trick is when you start an article, hit enter then hit the up arrow key.  Now whenever you type there is an extra return at the end of the document so you won't get the "link is the last item in the document" bug.

Michael Pryor
Saturday, December 22, 2001

When I highlight some text for adding a link or formatting, the highlighted text often includes the space to the right of the text.  If I insert the link and backspace to remove the underlined space the link goes away.

When CityDesk highlights that extra space, I've gotten into the habit to adding a comma after the last character in the linked text.  Thet stops the highlighting where I want.

So, if I want to "add this link" I type "add this link," highlight and insert the link then remove the comma.  It just takes a second.

TK
Wednesday, December 26, 2001

You can also select right-to-left (rather than left-to-right) to avoid the trailing space.

(By the way, the trailing space is selected so that if you move a few words elsewhere, you'll get the right number of spaces in both places. It's a general policy in Microsoft edit controls. You'll notice that the same thing happens right here on this forum when you post using Internet Explorer)

Joel Spolsky
Wednesday, December 26, 2001

*  Recent Topics

*  Fog Creek Home