I have to develop a code editor as my internship project.
But I could not find a head start in a brief search.
Firstly what should I, in your opinion, develop? A desktop code editor or an online code editor? Currently I am inclined for an online code editor. However, I am open to your suggestions.

Secondly, where should I start in case I choose to develop an online code editor? I couldnt find any guidelines on a brief google search.

Thank you.

Making a code editor is a very difficult task. The problem is that regular textarea's do not allow html to be executed within their text/value, however this can be bypassed but I could not find out how. A graduee at MIT (if I am not mistaken) has made a richt text editor as his final project which works perfectly. Perhaps you should check that out for ideas?

Make sure you download the uncompressed with comments version at the download section: http://nicedit.com/

~G

Making a code editor is a very difficult task. The problem is that regular textarea's do not allow html to be executed within their text/value, however this can be bypassed but I could not find out how. A graduee at MIT (if I am not mistaken) has made a richt text editor as his final project which works perfectly. Perhaps you should check that out for ideas?

Make sure you download the uncompressed with comments version at the download section: http://nicedit.com/

~G

You are making me sweat now :S
Then should i prefer developing a desktop editor?
Anyways, I will have a look at the link you pointed to. Thanks :)

If you still want to do an online editor why don't you check out existing ones and try to figure out how they do it. Two that come to mind are: http://www.w3schools.com/js/tryit.asp?filename=tryjs_intro andhttp://tinymce.moxiecode.com/. The first one lets you execute code as you edit the other is more of a text editor.

For an online editor Ajax is definitely going to be involved so you should brush up on that.Use firebug or a developer tool bar of choice to see what parts are involved and how they fit together.

I would consider how many features the code editor must have. If the user simply inputs code and then saves to view the code, you would simply have a text area and some php to save/output the code (not in real time). At the moment I'm working a news posting system for one of my sites, which has only take a week to develop (php, js text formatting, and output). But if you need syntax highlight, especially for multiple languages, real time output, and error finding, among other features, you will be in for a long project, which could easily take many months.

Also which languages are you more familiar with? You don't want to be learning the basics and developing a production level project at the same time; your code won't be consistent throughout the project and will probably have security and usability issues in some circumstances, especially when dealing with the web.

If you still want to do an online editor why don't you check out existing ones and try to figure out how they do it. Two that come to mind are: http://www.w3schools.com/js/tryit.asp?filename=tryjs_intro andhttp://tinymce.moxiecode.com/. The first one lets you execute code as you edit the other is more of a text editor.

For an online editor Ajax is definitely going to be involved so you should brush up on that.Use firebug or a developer tool bar of choice to see what parts are involved and how they fit together.

Sorry for being late but i was held up with some stuff.

Anyways, I had a look at the links that you guided me to. I have a vague idea which i am writing here. Correct me if i am wrong.

I am aware of the working of the first link. It would involve the php (or asp in the case of the link) for the execution of the code. The text area simply acts as the editor.

I am still going through the second link, the tinymce editor. I will say/ask upon it by tomorrow evening (as per my GMT + 5.30 time).

And ya, I have used AJAX technology in my minor projects; hence i am aware of it, though not thoroughly. And i have used firebug too earlier; must say that its very handy. I wouldnt have been able to debug javascript without it :)

I would consider how many features the code editor must have. If the user simply inputs code and then saves to view the code, you would simply have a text area and some php to save/output the code (not in real time). At the moment I'm working a news posting system for one of my sites, which has only take a week to develop (php, js text formatting, and output). But if you need syntax highlight, especially for multiple languages, real time output, and error finding, among other features, you will be in for a long project, which could easily take many months.

Also which languages are you more familiar with? You don't want to be learning the basics and developing a production level project at the same time; your code won't be consistent throughout the project and will probably have security and usability issues in some circumstances, especially when dealing with the web.

No, I am not just going to create a write-and-save editor. It will go a bit complex - syntax highlighting (atleast for a language or two, which i guess it will be easier for other languages if i figure it out for one), some formatting features. And its like though i have only a month for the internship, i dont have the constraint to provide a full-fledged working editor. I may work on it as much as possible, and then continue developing it later.
And no, I am no beginner. Programming is my academic focus, me being an IT student. So i am aware of web development - php, javascript, ajax, etc :)

Just wanted to point out a few things to consider. :)

Just wanted to point out a few things to consider. :)

yeah..i am aware of that ;)
i just made my stance clear so that you could guide me further on the basis of that. So what do you think how far can i go with this?

Well I have been looking around on how to make a code editor, and perhaps you can make a desktop code editor? A documentation exists on RichEdit at msdn, you should check it out. But I won't be able to help you with it as I am a novice at WinAPI programming, so if you stumble on a problem, you will have to visit the C++/C forum.

The link: http://msdn.microsoft.com/en-us/library/bb787605%28v=VS.85%29.aspx

~G

Well I have been looking around on how to make a code editor, and perhaps you can make a desktop code editor? A documentation exists on RichEdit at msdn, you should check it out. But I won't be able to help you with it as I am a novice at WinAPI programming, so if you stumble on a problem, you will have to visit the C++/C forum.

The link: http://msdn.microsoft.com/en-us/library/bb787605%28v=VS.85%29.aspx

~G

ok so you are saying that a desktop code editor would be easier to build than an online one? And I am not going to work on Windows. Its linux for me..opensuse.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.