Online file editor [closed]
Questions asking for code must demonstrate a minimal understanding of the problem being solved. Include attempted solutions, why they didn't work, and the expected results. See also: Stack Overflow question checklist
Closed 9 years ago.
Improve this questionHow can I create an online file editor? My web application will allow a user to create a new text file, edit it and save it. He can do so with multiple files open in mult开发者_运维百科iple tabs.
If these are only txt files then;
Choose the file store to use. Either store the files in a db or on the file system.
Then all you need to do it load in the file and render it within a textarea and save that back to the file. You may want to keep copies for backup purposes and undo or something.
If you want the file to have nice colors etc then consider a jQuery editor like tinymce.
If however you want to edit any type of doc like word, excel then i think you'll need to use the office object model. but that won't help you with other formats.
As for the tabs, there are heaps of jQuery tab controls out there that will do exactly what you're looking for.
Check out https://bespin.mozillalabs.com/
It is open source.
精彩评论