Losing XCODE Tag Formatting

IanRyder

Well-known member
Joined
Sep 9, 2012
Messages
1,130
Location
Healing, NE Lincs, UK
Programming Experience
10+
Hi All,

A quick question if I may. If I make a post and encase a block of code within XCODE Tags then that's fine.

However, if I then edit that post to add something further all the code within those tags gets horribly messed up and the only way I can get round this is to re-add the whole post, including the extra info, and then re-add the XCODE tags, which is a pain.

Am I missing something or is that just how it works?

Cheers,

Ian

How daft of me, the Tags I demonstrated in the first sentence got removed. Hope this makes better sense now.:)
 
Last edited:
I am sometimes editing posts including with XCODE tags, but have not seen the problem you describe. Could it be just initial rendering after edit that is troublesome? Are you using 'preview' before submitting? If you refresh page after submitting, is whatever you see 'fixed'? The reason I ask is because the XCODE formatting is applied client-side by Javascript after page is loaded, so if post is edited inline and saved the page is not reloaded (ajax), thus the script is not executed at that time, but when you reload page the script once again takes effect.
 
Hi JohnH,

OK, Let me try that with some code. This post is un-edited after posting so this will post fine:-

e.Graphics.DrawImage(ImageList1.Images(n), 100, currentTopMargin, 90, 90)
totaPicturesPrinted += 1
currentTopMargin = (currentPictureOnThePage * 100) + 60
currentPictureOnThePage += 1


Cheers,

Ian
 
Hi JohnH,

OK, Let me try that with some code. This post has been edited after posting so I will try a page reload:-

e.Graphics.DrawImage(ImageList1.Images(n), 100, currentTopMargin, 90, 90)
totaPicturesPrinted += 1
currentTopMargin = (currentPictureOnThePage * 100) + 60
currentPictureOnThePage += 1


Cheers,

Ian

Now Edited!
 
Last edited:
That's it JohnH,

I edited the post and the code went horrible as I have seen but I left it this time, logged out, and reloaded the page and all was fine.

Thanks for the help JohnH, I now know for the future.

Cheers,

Ian
 
Just a quick heads up, you don't actually need to log out, just hit the Refresh button in your browser. Hopefully you are not using the horrible thing that is IE.
 
Back
Top