Fog Creek Software
Discussion Board

Knowledge Base
Terry's Tips
Darren's Tips

cd:pos="5" in CD automatic img insertion

What is the cd:pos="5"?  This code is created when I insert an image into my page.  I can't find a reference to cd:pos in the html references.

<SPAN><IMG height=137 alt=[Image] src="PTMFOG0000000127.jpg" width=124 border=0 cd:pos="5"></SPAN>
<a href="#" onClick="window.close();">Close</a>

Joel C. Goldstick
Monday, November 4, 2002

I get cd:pos="3" cd:pos="9" cd:pos="6" and probably more.  What are they?

Monday, November 4, 2002

I believe that CityDesk puts them in depending on the position that you insert the image (left-aligned, centred, etc). Why it does it I don't know.

But I remove the cd:pos tags to ensure standards compliance of the html, and there appear to be no ill effects.

John C
Monday, November 4, 2002

It is compliant to HTML as long as no cd:pos attribute is parsed by the browsers. I would prefer it not to be encoded like this however. (external or in comment would be better)

Adriaan van den Brand
Monday, November 4, 2002

It's there so when you go back to the Insert Picture dialog, CityDesk knows what alignment you were using.

The ':' is supposed to add a namespace which means it won't break anything else.

Joel Spolsky
Tuesday, November 5, 2002

Ok Joel, but if you add this information, why is it I often loose heaps of text when I delete a picture?

I know, it is in the <SPAN> </SPAN> that is also used to position the image, but if Citydesk knows what the position of the image should be, it should also know what text belongs to the picture and what text does not.

Adriaan van den Brand
Thursday, November 7, 2002

*  Recent Topics

*  Fog Creek Home