Click here to Skip to main content
13,298,818 members (37,976 online)
Click here to Skip to main content
Add your own
alternative version


26 bookmarked
Posted 23 Oct 2008

Online Code Editor

, 23 Oct 2008
Rate this:
Please Sign up or sign in to vote.
With Online Code Editor, you can edit your code online.


With the Online Code Editor, you can edit your code online. It allows to write well-formatted source code with line enumeration, tab support, search and replace (with regexp), and live syntax highlighting (customizable).



The Online Code Editor is based on EditArea, a free JavaScript editor for source code, created by Christophe Dolivet. We added a file browser to manipulate files (load and save). The file browser is based on a tree, like MS Explorer. The script code of the tree was created by Geir Landrö.

Using the code

You just upload a page and a directory to your server, and then you can navigate the files and edit them.

Points of interest

This is the recursive directory script:

Sub RecursiveDir(ByVal Root As String, ByVal pID As Integer, _
                 ByVal ListFiles As Boolean)
    Dim Folder As New DirectoryInfo(Root)
    Dim SubFolder As DirectoryInfo
    Dim File As FileInfo
    For Each SubFolder In Folder.GetDirectories
        iID = iID + 1
        If LCase(SubFolder.Name) <> "_codeedit" Then
            Response.Write("d.add(" & iID & ", " & pID & _
                           ",""" & SubFolder.Name & _
                           """);" & vbLf)
        Call RecursiveDir(Root & "\" & SubFolder.Name, iID, ListFiles)

    If ListFiles Then
        For Each File In Folder.GetFiles("*.*")
            iID = iID + 1 If LCase(File.Name) <> "_codeedit.aspx" Then_
             Response.Write("d.add(" & iID & "," & _
                pID & ",""" & File.Name & _
                """,""_codeedit.aspx?side=right&screenwidth=" & _
                Trim(Request("screenwidth")) & "&screenheight=" & _
                Trim(Request("screenheight")) & "&file=" & _
            Server.UrlEncode(Root & "\" & File.Name) & """);" & vbLf)
        Response.Write("d.icon.node =""_CodeEdit/images/folder.gif"";" & vbLf)
    End If
End Sub


This is a rough version. We have plans to update it soon. Please visit our website to get any updated news.


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


About the Author

Industria Virtual
Web Developer Industria Virtual
Brazil Brazil
Taylor made web applications for you and your business.

You may also be interested in...


Comments and Discussions

GeneralRe: Embed into a project Pin
Member 35985511-May-11 11:55
memberMember 35985511-May-11 11:55 
GeneralThanks Pin
chodi27-Oct-08 17:33
memberchodi27-Oct-08 17:33 

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.

Permalink | Advertise | Privacy | Terms of Use | Mobile
Web02 | 2.8.171207.1 | Last Updated 23 Oct 2008
Article Copyright 2008 by Industria Virtual
Everything else Copyright © CodeProject, 1999-2017
Layout: fixed | fluid