PDA

View Full Version : Web-based code editor



Tristan_Williams
November 16th, 2014, 07:15 PM
As most people know, you can paste the following snippet of HTML into a web browser to get a simple text editor:
data:text/html, <html contenteditable>

How could I write an HTML/CSS document that acts the same way, but has auto-indenting, syntax highlighting, and line-numbers?
It would also be great to be able to save the code to a file on the computer, but it's not necessary.

pqwoerituytrueiwoq
November 16th, 2014, 07:48 PM
why do you want to reinvent the wheel?
http://jsfiddle.net/

Tristan_Williams
November 16th, 2014, 08:03 PM
why do you want to reinvent the wheel?
http://jsfiddle.net/

That's for editing HTML. I don't want to edit HTML. I want to edit Bash, and once I figure out how to do that, I can modify it to have a menu that allows you to select other languages. HTML is probably the last language I want to work with.

Plus, jsfiddle.net is too much. I just want a dropdown menu at the top, and the rest of the page be for text or code

Gustaf_Alhll
November 16th, 2014, 08:09 PM
Netbeans might work for you: https://netbeans.org/features/html5/index.html
Not completely sure, but it's all mostly text-based (And yes, it also works with PHP and Java EE).
The bigger question is if it exists for Linux (I assume that's your operating system), but it probably does.

pqwoerituytrueiwoq
November 16th, 2014, 08:11 PM
Why do you want to edit bash/shell in a browser, what is wrong with a text editor like geany/notepad++/atom/etc

Tristan_Williams
November 16th, 2014, 08:25 PM
Why do you want to edit bash/shell in a browser, what is wrong with a text editor like geany/notepad++/atom/etc

Nothing is wrong with using a text editor. I actually use Gedit for most everything.
I just thought it would be cool to add syntax highlighting and auto-indent to that html page.
It could be useful if soemone wanted to do everything in a browser