Click here to Skip to main content
12,550,735 members (31,784 online)
Click here to Skip to main content
Add your own
alternative version

Tagged as


8 bookmarked

Using the Article Editor (without losing your hair in handfuls)

, 17 Jun 2014 CPOL
Rate this:
Please Sign up or sign in to vote.
The Article editor does work - but sometimes it does do things the hard way, and tries to frustrate you on purpose, I'm sure...

Editorial Note

Having trouble writing or posting articles? These articles aim to gather together tips and tricks from authors and mentors to help you write great articles.


I've been writing stuff here for a while, and every time I do it I end up spending more time faffing about and swearing at the Article Editor than I do actually writing text: and my major problem is getting code samples into the document as code blocks. So lets start by looking at that.

Code blocks

It just hates me, I'm sure.

Let's try: Copy some code from your application, and paste it in:

        /// <summary>
        /// Human readable version
        /// </summary>
        /// <returns></returns>
        public override string ToString()
            return Title + " : " + Path.GetFileName(OldPath);

Nope. not right. This version is better than the last Editor, but it isn't quite right: look at it in the Preview and you'll see:

What we want is:

/// <summary>
/// Human readable version
/// </summary>
/// <returns></returns>
public override string ToString()
    return Title + " : " + Path.GetFileName(OldPath);

Fortunately, that isn't as hard to do as it was - in the previous version I ended up switching to HTML mode, pasting the code, then manually adding the <pre> tags:

<pre lang="cs">        /// <summary>
        /// Human readable version
        /// </summary>
        /// <returns></returns>
        public override string ToString()
            return Title + " : " + Path.GetFileName(OldPath);

Which was clumsy, and a nightmare if you forgot and pasted it into the text, as it applied the code formatter information, but not the code block - and to fix that you had to manually remove all the span tags it had added...and it normally ate all the VS Intellisense parts in comments, sicne they looked like HTML tags to it... :sigh:

This version is easy:

1) Paste the code:

        /// <summary>
        /// Human readable version
        /// </summary>
        /// <returns></returns>
        public override string ToString()
            return Title + " : " + Path.GetFileName(OldPath);

2) Highlight it:

3) Go to the toolbar, and click the "Remove Format" button (strictly, you don't have to do this, but just in case:

4) Highlight the code again, and use "Paragraph Format" dropdown to select "Formatted":

5) Use the "Language" drop down to select the appropriate language highlighter:

6) Now, your code looks like this:

And in the preview it looks like this:

Which is what we wanted.


You noticed the images, yes? They are really easy to insert, particularly if you have DropBox installed on your PC. If you do, then whenever you take a screenshot, it is automatically saved to the Dropbox/Screenshots folder for you, so you don't even need a Paint program to include screenshots. Handy...

If you don't have dropbox:

This is more cumbersome: Take the screen shot using the ALT and PRINTSCREEN buttons, and paste it into a new image in your paint program (I use Paint Shop Pro 9 which causes it's own problems, since it disables Aero for compatability, so I have to keep opening and closing it to get consistant looking images). ALT and PRINTSCREEN copys the current window, so if you re-size it to just what you want, you are ready.

Save the file.

If you do have drop box.

Use the ALT and PRINTSCREEN buttons to save the current window. This saves the current window as is, so if you re-size it to just what you want, your file is ready.

Add it to your "Current Files" list:

Easy way: Drag the files from the folder and drop them on the "Target":

This adds them to the "Current Files" list, so all you have to do is place the cursor where you want the image, and click the "Insert image into article" button:


Adding a download

Start by creating a ZIP file of your project, then upload it to CodeProject and insert it into your document.

The process for this is the same as for an image: use the "Upload Files" box on the right hand side of the screen:

Except this time you get a "special" insert area at the top of the list:

Make sure the checkbox is ticked - it is by default - and click on "Add selected zip files to article"

This creates the download link in it's normal position at the top of the article:


2014-06-17 Original Version


  • Typo corrected: "teh" became "the".
  • Heading corrected on "History" section.


  • Download added (for download adding demo only)
  • Section added on providing a download.


This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


About the Author

Wales Wales
Born at an early age, he grew older. At the same time, his hair grew longer, and was tied up behind his head.
Has problems spelling the word "the".
Invented the portable cat-flap.
Currently, has not died yet. Or has he?

You may also be interested in...


Comments and Discussions

GeneralMy vote of 5 Pin
Mika Wendelius30-Sep-16 22:05
mvpMika Wendelius30-Sep-16 22:05 
QuestionBlog Post fetched via feeds Pin
Ehsan Sajjad8-Oct-15 8:28
professionalEhsan Sajjad8-Oct-15 8:28 
AnswerRe: Blog Post fetched via feeds Pin
OriginalGriff8-Oct-15 8:44
protectorOriginalGriff8-Oct-15 8:44 
GeneralMy vote of 5 Pin
Anurag Gandhi27-Jan-15 22:22
professionalAnurag Gandhi27-Jan-15 22:22 
BugIronically... Pin
Matt T Heffron17-Jun-14 14:06
professionalMatt T Heffron17-Jun-14 14:06 
GeneralRe: Ironically... Pin
_Noctis_12-Aug-14 14:44
professional_Noctis_12-Aug-14 14:44 
GeneralRe: Ironically... Pin
OriginalGriff12-Aug-14 18:46
protectorOriginalGriff12-Aug-14 18:46 
GeneralRe: Ironically... Pin
_Noctis_12-Aug-14 19:06
professional_Noctis_12-Aug-14 19:06 
GeneralRe: Ironically... Pin
OriginalGriff12-Aug-14 20:19
protectorOriginalGriff12-Aug-14 20:19 
GeneralRe: Ironically... Pin
_Noctis_12-Aug-14 21:36
professional_Noctis_12-Aug-14 21:36 
GeneralRe: Ironically... Pin
den2k884-Dec-14 0:49
professionalden2k884-Dec-14 0:49 
GeneralMy vote of 5 Pin
phil.o17-Jun-14 4:22
professionalphil.o17-Jun-14 4:22 
QuestionFormatting Pin
Kenneth Haugland17-Jun-14 1:00
professionalKenneth Haugland17-Jun-14 1:00 
AnswerRe: Formatting Pin
Pete O'Hanlon17-Jun-14 4:20
protectorPete O'Hanlon17-Jun-14 4:20 
GeneralRe: Formatting Pin
Kenneth Haugland17-Jun-14 4:31
professionalKenneth Haugland17-Jun-14 4:31 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

| Advertise | Privacy | Terms of Use | Mobile
Web01 | 2.8.161021.1 | Last Updated 17 Jun 2014
Article Copyright 2014 by OriginalGriff
Everything else Copyright © CodeProject, 1999-2016
Layout: fixed | fluid