Click here to Skip to main content
6,595,444 members and growing! (20,434 online)
Email Password   helpLost your password?
Web Development » ASP.NET » Utilities     Intermediate License: The Code Project Open License (CPOL)

Online Code Editor

By Industria Virtual

With Online Code Editor, you can edit your code online.
VBScript, Javascript, CSS, HTML, XHTML, ASP, ASP.NET, WebForms, Ajax, Dev
Posted:23 Oct 2008
Views:6,528
Bookmarked:18 times
Announcements
Loading...
 
Search    
Advanced Search
Add to IE Search
printPrint   add Share
      Discuss Discuss   Broken Article?Report  
3 votes for this article.
Popularity: 1.43 Rating: 3.00 out of 5
1 vote, 33.3%
1

2
1 vote, 33.3%
3

4
1 vote, 33.3%
5

Introduction

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).

Screenshot...

Background

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)
    Next

    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)
        Next
    Else
        Response.Write("d.icon.node =""_CodeEdit/images/folder.gif"";" & vbLf)
    End If
End Sub

History

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

License

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

About the Author

Industria Virtual


Member
Taylor made web applications for you and your business.
Occupation: Web Developer
Company: Industria Virtual
Location: Brazil Brazil

Other popular ASP.NET articles:

Article Top
You must Sign In to use this message board.
FAQ FAQ 
 
Noise Tolerance  Layout  Per page   
 Msgs 1 to 1 of 1 (Total in Forum: 1) (Refresh)FirstPrevNext
GeneralThanks Pinmemberchodi17:33 27 Oct '08  

General General    News News    Question Question    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

PermaLink | Privacy | Terms of Use
Last Updated: 23 Oct 2008
Editor: Smitha Vijayan
Copyright 2008 by Industria Virtual
Everything else Copyright © CodeProject, 1999-2009
Web15 | Advertise on the Code Project