so that folks can easily make edits to files in a git repository from their browser without having to clone a whole repo
This would be very useful. Some prospective editors may want to make a minor change, but not be interested in setting up a git system on their computer and understanding the subtleties of commit, push, pull, etc. There are several editors already available such as TinyMCE, Kupu, WYMEditor, NicEdit, Xinha and CB RTE
:+1:
+1
This was one of the first things I noticed in gogs, the lack of a web-based file editor integrated into the system. (I don't want to minimize how hard it would be to implement this, just to note that it would be very welcomed.) I find that I use the github editor extensively.
+1
@Unknwon If you have an editor preference (Ace, CodeMirror, etc..) I'd be happy to help you out with implementing this one!
@iBourgeois thanks!
But yes, I have hard time choose between Ace and CodeMirror... :joy:
@Unknwon Lol. I'm not sure if it'll help your decision to know that GitHub uses Ace. https://github.com/blog/905-edit-like-an-ace
@iBourgeois thanks your link!
Let me think about it first...
Having a REST API so folks can POST edits would be great; then folks could use their own custom editors too. But yeah - having Ace or CodeMirror included by default would be great! :)
+1
This is very nice feature!
Waiting for this feature!!!
:+1:
+1
+1
:+1:
:+1:
:+1:
:+1:
Hullo, I would also like to add that this would be a very useful feature to add to gogs (which is great).
I see on the trello board it is in progress for 0.9.0, please let me know if I can assist with the implementation. A cursory look suggests CodeMirror would be a good choice?
I'm not sure use Ace or CodeMirror...
:thumbsup:
:+1:
@Unknwon need to be go lib or javascript?
@joubertredrat hmm? What do you mean?
@Unknwon for create web edtior, you intend to use one go library is exists or javascript libraries, as codemirror or ace?
@joubertredrat yes, I'm not sure to use codemirror or ace...
@Unknwon then have Ymacs (old) or Markitup to consider, if I found more on my old bookmarks, I put here.
Hmm.. that seems too powerful.
Don't intend to make Gogs a online development env, but just for quick editing.
Thoughts? My use case may limit my understanding of this feature.
Hmmm,
Then Why not only textarea with support to indentation only for files texplain to test and see if this is good feature for next releases? For me this feature is only a quick editor too.
Would it be possible to provide a simple text editor? You could use
CodeMirror or even something smaller for the interface and provide a method
in the server that provides the commit to the repository. Once you do this,
it would be possible for others to provide their own interface for editing files.
I would be willing to build an interface for DocBook or AsciiDoc editing,
just as long as the server side portion is ready.
I'll try CodeMirror first see how it goes.
Code editing with the ability to create files and directories is the only feature stopping us from using Gogs today.
+1 For a simple solution. I mostly use this on github to edit my readme.
@binford2k create files and directory isn't good feature on Gogs for now. Edit files is good because you can make small fixes or edit document files as example.
everyone's need is slightly different. it would be nice if @Unknwon can create a simple sample so that anyone can build whatever on top of it.
@joubertredrat why would that be not a good feature? You know that creating and changing a file isn't really all that different to git, right?
@binford2k as @Unknwon saw, "Don't intend to make Gogs a online development env, but just for quick editing." and I agree.
Gogs is very nice application and good alternative for Gitlab and others because it's simple.
Create folders and files will be first step for make Gogs similar online development and this isn't the objective for now.
The GitHub itself decided to implement the option to create files only now and is only files, not folders.
If it is for the future, so might be a good feature. @Unknwon what you think? Create another issue with "hability to manage folders and files"
If it is for the future, so might be a good feature. @Unknwon what you think? Create another issue with "hability to manage folders and files"
Hmm.. as Git does not care directories, I think edit and create file is all we need. But the editor is meant to be simple (or as less customization for Gogs as possible).
@Unknwon I don't know how to work git core, but I'm afraid the ability to create folders create excessive commits, hindering the reading of legitimate commits.
And I agree with you about editor need to be more simple than possible.
You can't create an empty directory in Git, it just ignores. So create file would create (or add to Git history) all necessary folder at the same time.
@joubertredrat by that metric, ms notepad is an IDE
Try this in github. Click the new file button and add a new file of "a/very/long/path/that/does/not/exist.txt". That's all javascript goodness. The only thing that creating directories requires is accepting / as a valid file path character.
See https://github.com/gitlabhq/gitlabhq/commit/7f104b8dee223b0b06b57bb9c5ea293cdabc7bff
For my purposes, just having the wiki editor (MarkDown capable) available to edit files in the main repo would be perfect!
Keep up the good work, gogs is awesome!
+1 Why is removed from milestone?
+1 for this awesome feature!
+1 This feature would certainly make my life easier. I am using gogs to allow me to work from behind a proxy to my home server and this would help when I dont have ssh access.
+1 We would be very interested by this feature !
+1
Wow, still not yet working in gogs. Code editing with the ability to create files and directories is the only feature stopping us from using Gogs today. I try to imagine how @unknown don't find this feature important. Gogs is a good os community which should keep improving by the desires of its users.
@lavvy just to clarify it's not going to an online IDE.
@Unknwon ok but it will be a realy nice feature, lot of people ask for it, look the +1 on this thread. Gogs is a really good project and adding this feature will be more user friendly, not everyone has the possibility to star a git session everywhere and doing it from the web interface will be really helpful
@Nhoya I'll try on 0.10, but no promises.
@Nhoya I can't quite agree with you. I +1 this because it's a feature to allow for quick edits to a file outside if I'm away from my computer, or to allow inexperienced users to comment or make edits to documentation. Basically, the same reasons why I can edit files in GitHub. I agree with @Unknwon that having full edit support will be a bit tough.
Maybe a start is to allow editing existing files first, then from there additional features can be added.
Guys, you want web IDE? https://icecoder.net/
Be happy.
I'll try to setup Ace Editor first with very basic editing feature.
@Unknwon, don't listen to the slackers, the original feature to be only a web editor is nice, if they want web IDE, have a lot on open source community.
"bla bla bla I will use gogs only if it have button to I deploy my code on moon bla bla bla".
Nobody is a slacker here, everyone cannot be a coder. Just imagine if
everyone on earth knows everything, it gonna be very boring . Everyone has
his bit. Noobs shouldn't be crucified. They got to live too.
On Mar 6, 2016 2:10 PM, "Joubert RedRat" [email protected] wrote:
@Unknwon https://github.com/Unknwon, don't listen to the slackers, the
original feature to be only a web editor is nice, if they want web editor,
have a lot on open source community.—
Reply to this email directly or view it on GitHub
https://github.com/gogits/gogs/issues/1071#issuecomment-192964677.
clearly web editor is very low priority in this project.
if you want free stuff, use github.
if you need web editor in gogs, make one yourself. if you can't code, hire a coder to write a plugin.
@hellochenwang the problem isn't not this, for open soure project always is good to talk about new features, the problem is talking about "the project will be awesome if this feature is in" or "I don't use your project only because don't have this feature".
This kind of talk isn't productive.
Hey @Unknwon I will definitely only use the Gogs when I hover my mouse on logo, it sing a song to my repo to sleep.
Gogs is a nice project . but seems some techies locking others out.
Everyone in the community would like to use gogs , but what will weaker
ones do when the barrier is too high. For instance a noob who cannot edit
codes through git will not be able to use it. In this age, every project is
aiming to bring down entry hurdles. The Ace editor is so good enough for
entry level. We love gogs and we want to take part too, even as the
techies want us out. But i ll still keep faith.
On Mar 6, 2016 5:58 PM, "Joubert RedRat" [email protected] wrote:
@hellochenwang https://github.com/hellochenwang the problem isn't not
this, for open soure project always is good to talk about new features, the
problem is talking about "the project will be awesome if this feature is
in" or "I don't use your project only because don't have this feature".This kind of talk isn't productive.
Hey @Unknwon https://github.com/Unknwon I will definitely only use the
Gogs when I hover my mouse on logo, it sing a song to my code sleep.—
Reply to this email directly or view it on GitHub
https://github.com/gogits/gogs/issues/1071#issuecomment-193011745.
@lavvy The techies are not locking you out. The subject of this issue was to implement a web editor for existing files in a repository. What you are asking for is additional features onto this. I'm not denying what you are asking for isn't required. I would love to see such a feature, but that's not the focus here.
What I would recommend is to create multiple Issues along with this for these subjects. I'm sure there are other features that would have to be looked at as well.
Keep in mind techies are trying to keep things on topic so we get a new version out sooner.
+1 for this awesome feature!... We're waiting...
@lavvy As a "techie" I honestly don't understand your use case. It kind of sounds like you're using a git service wrong.
Don't get me wrong an advanced editor would be nice but a simple editor would add probably 95% of the value that a complex editor would but in 1/10th of the time.
Kinda seems like a no-brainer to me.
Please guys don't get me wrong. U guys may have misinterpreted me. I only
wished for a way to edit code through the browser only (just like it is in
the wiki already) . But since @unknown said he would integrate ace editor,
i can't ask for more. In fact
We are all on the same page, any simple editor at all is cool for the
moment
1+ for code editor. Gogs could be such a powerful tool but without editor and adding files over web interface, I dont know. Please add code editor. Massive thanks.
Just an inquiry on this, mainly for @Unknwon: What is the reason the "Edit" feature with an MD edtor is available for Wiki pages, but hasn't been done or turned-on for repo files? Wouldn't it be about the same? What are the potential problems, if any, of doing the same thing for repo files?
@richmahn after an editor is chosen, implementation is similar to the edit feature for the wiki pages. the differences start with the need to configure syntax highlighting per file type, then allow customization of the editor in the users preferences (font, font-size, theme, etc...) as well as some configuration on/around the editor itself (tab-spacing, wrap mode, etc...). from there you can take customization options as far as you'd like or just stick with the basics.
Then you can go into other features (depending on the editor) like tab completion, snippets, etc...
@iBourgeois I think @richmahn is asking why we can't just enable what currently is setup on the Wiki pages for the repo files. Granted, it's not a "code editor", but it is a nice Markdown editor.
To even be able to just edit the README.md file would be nice. :smile:
agreed. @Unknwon already said he wanted to keep it simple. now that I have my linux box back up, I'll work on a pull request this week. i've been stuck on a surface tablet for the past few months :frowning:.
he mentioned ace editor earlier on, so I will see what I can do!
@iBourgeois Sounds great! We're in need of it with many users. Keep us posted.
@iBourgeois Hey there, just seeing if you had a chance to see if this is doable and if you have made any progress. Let me know if you need any help.
Like us too, we are so in need of this feature
On Mar 28, 2016 3:12 PM, "Richard Mahn" [email protected] wrote:
@iBourgeois https://github.com/iBourgeois Hey there, just seeing if you
had a chance to see if this is doable and if you have made any progress.
Let me know if you need any help.—
You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub
https://github.com/gogits/gogs/issues/1071#issuecomment-202534722
@lavvy @richmahn I made a little progress. This was my first time looking into the code for this project, but I managed to isolate the files that I need and make a few adjustments.
This is also my first time working with golang, lol. Interesting... thus far!
Like I said before, I'm new to golang...
When viewing a file, I have managed to add an Edit button that points to the current file and appends /edit to the url.
the first problem I have is that I can't figure out where to add the translation. I tried adding it to the conf/locale/locale_en-US.ini file next to the translations for the other buttons (Permalink, History, and Raw), but no dice, lol.
I have also created a new template file for the edit page which brings me to my second problem...
Where do I add a route to view it?
While I await a response, I will start importing Ace Editor into the pubic/plugins directory.
nevermind on the routes... i just found them in web.go
@iBourgeois I don't know if it will help, but here is what I learned about the router and putting a edit icon on the file view page. I got to where I was about to change EditRepo() function from the Wiki edit function. https://github.com/unfoldingWord-dev/gogs/compare/master...unfoldingWord-dev:file-edit
This is not saying this is the way to do it, just what I toyed around with to make sure I understood the system. I did this all before you even said you were going to do this, so not competing with you. :smile: Hope it helps.
@iBourgeois Also good to always see the functionality of editing files on Github. For example, you can only edit a file that is at the HEAD of a branch, not when viewing a file of a commit that isn't a branch. So we need to make sure that the edit icon only appears when viewing a file of a branch, and not just any commit, and that the /edit/ call has a valid branch name, etc.
For example:
Can edit: https://github.com/Door43/d43-en/blob/master/obs.txt
CANNOT edit: https://github.com/Door43/d43-en/blob/ea2c0e967dbf2376813ee711986923568b49e56a/obs.txt
Hey friends any progress on this
Yes, also wondering on the progress of this. I probably could have done it in 2-4 hours to at least get it to edit files like in the wiki, but didn't want to step on @iBourgeois's toes and had other stuff to work on. Any update?
@richmahn the only reason i offered was because it didn't appear that anyone else was working on it. i wouldn't feel like you were stepping on my toes at all as I am having to learn Go throughout this process. I have also switched from using Gogs to GitLab CE a few months back for CI purposes. While I have done quite a bit of work with editors such as ACE/Codemirror, I have done VERY little with Go.
Any help with this feature please
On Apr 6, 2016 6:30 PM, "Derek Bourgeois" [email protected] wrote:
@richmahn https://github.com/richmahn the only reason i offered was
because it didn't appear that anyone else was working on it. i wouldn't
feel like you were stepping on my toes at all as I am having to learn Go
throughout this process. I have also switched from using Gogs to GitLab CE
a few months back for CI purposes. While I have done quite a bit of work
with editors such as ACE/Codemirror, I have done VERY little with Go.—
You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub
https://github.com/gogits/gogs/issues/1071#issuecomment-206596678
@lavvy why the rush? why you can't wait?
Hoping this feature would be added to 0.10.0, because it has been changed a couple time. And this feature is so highly wanted from the community. Also, hey, you reached double digit on your minor ver., make it meaningful.(中国人露头支持国人雄起)
@joubertredrat that is the point am trying to make, this feature has been characterized so much with hopes. As it is we don't even know how long we have to wait. Every promises of it has all ended up with heartbreaks.
@joubertredrat Because there is absolutely no point to a self-hosted git website if content editors can't edit files, especially if they don't know how to use git on a command line and if all that is beyond them. Since we don't have this feature, we had to make the repos last week on Github and have them edit them there....it works, but would be nice if it was our own server.
@lavvy @richmahn I understand that this is awesome feature and I'm waiting too, but I see they are trying to rush things. I've seen projects die because of it. I only ask to be more patient
@richmahn, wrong. There is no point to a self-hosted git website if content editors don't know how to use git. The Web Editor is just a PLUS
Sure ! +1
@Unknwon I was doing research between Ace and Codemirror, which come across Firepad, that included both editor into one through switching the config. I would encourage you to take a look and end the hassle of choosing between those two.
@tony199555 thanks! Will evaluate that one as well.
+1 for Code Editor :+1: Yes I just started using Gogs today and the first things I noticed was missing is a file editor.
+1
+1
@Unknwon SimpleMDE which is used for wiki-pages is based on CodeMirror so my suggestion is to go with that one
One could use the same code for wiki-pages as for web-editor :smiley:
@bkcsoft hmm... but that's a Markdown editor, right?
@Unknwon SimpleMDE is a markdown editor, but CodeMirror (which SMDE is
built on) has a crapton of syntax highlights :smiley:
@bkcsoft But I think it's better to use CodeMirror directly.
@Unknwon that's what I've been trying to say for the past 2 comments
:laughing:
@Nhoya I don't get where you think having revision control and a way to graphically on the web see difference between edits (diffs) and know who committed what means the content editors who don't even know how to properly use a chat system can figure out git commands. I have even worked with content editors of Drupal, Wordpress and many other high-end content management systems and to even get them to understand what they were seeing on the web page to login and do in-line editing was hard.
Yet they are the ones that write the Bible texts and other Bible translation notes text, and we do want to keep it better under revision and from our own servers. I took time to write this just because I don't get why you think anyone who uses the Internet should be able to use Git. I tried to get the Content Editors of our team to even use Github Desktop and that was a comedy of errors if I ever saw one, were they had to be shown how to log into it. Does that mean they can't be good content editors? By no means, they know their stuff about grammar and such, but we need them to directly edit content online rather than by giving us Word documents which is a hassle and bad form. Just so you know...
Anyway, with that said, we are still wondering if anyone is working on this, if any ideas have been solidified, and if we can figure out a battle plan for making web browser editing possible.
+1
@unknown, thought you gave us your word on this
Going to work on this in a fork, making it at least like the editing in Wiki pages, as that at least provides a Markdown editor, which is all we need...even a plain text area would be helpful and a start. Just stating this in case anyone else is working on it...let me know if you are, or interested in testing when I'm done.
awesome men, keep up
2016-05-03 20:23 GMT+02:00 Richard Mahn [email protected]:
Going to work on this in a fork, making it at least like the editing in
Wiki pages, as that at least provides a Markdown editor, which is all we
need...even a plain text area would be helpful and a start. Just stating
this in case anyone else is working on it...let me know if you are, or
interested in testing when I'm done.—
You are receiving this because you commented.
Reply to this email directly or view it on GitHub
https://github.com/gogits/gogs/issues/1071#issuecomment-216619760
@richmahn Im interested in having this feature. I would be willing to test it when you are done. Just let us know the progress ....
Just some things to consider...
I wonder how they edit their codes on the go, to the ones that say this
feature is not necessary.
On May 6, 2016 2:50 PM, "megadr01d" [email protected] wrote:
Just some things to consider...
-
For some users it's not question of not having enough skill to use
git, it's about not being able to install/use git when away from home/main
computer (due to a corporate environment and lack of admin privileges or
public library computer, for instance).
-Creating/deleting dirs and files
https://github.com/gogits/gogs/issues/1071#issuecomment-176766241 is
not rocket science and it's not "making things complicated". GitHub's edit
and delete buttons say "Fork and " so you're only creating/destroying your
own stuff.
-Both Ace and CodeMirror have their own set of plugins which already
support line numbers, indentation options, heuristic syntax highlighting
(based on extension, which works for most cases), hotkey support (including
vim, Sublime Text or Emacs templates), line highlighting, rulers, etc. gogs
doesn't have to implement these functionalities.—
You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub
https://github.com/gogits/gogs/issues/1071#issuecomment-217527511
@lavvy Exactly. I have to so many times make a quick change from my phone, tablet, or just when at someone else's desk. I also need, even when it comes to programming code (yet git can be used for content as I spoke about above), sometimes you have people who work with just the database or design (css, etc.) and need to make a quick change.
Adding my own +1 for this, and I'm watching @richmahn's fork closely to see if it can add this feature.
I don't have a need for a full web IDE, I just want the ability to edit files on the fly. Markdown would be nice, but even just plaintext would be enough for me.
@joubertredrat and @wsidl please if you want do a quick edit on the fly, how do you do it
I host a project that's basically a bunch of text files with documentation on how to set various things up: https://gitlab.com/Espionage724/Linux/tree/master
Every file and directory in that project was created through GitLab's web interface, and prior to moving to GitLab, I also had something similar set-up on GitHub.
Having a similar feature for Gogs would be nice :) +1
@richmahn l can't seem to see the edit button. I had to build a docker container with your fork but i can't seem to get the edit button
@lavvy I'm one of those who support this feature, but I know how to wait and I know how to use git. You definitely will not see me talking "I will use your tool only when this feature is on", " thought you gave us your word on this" or similar words because I'm not boring.
Then I will wait when this resource go to beta or production, I'm not hurry.
For all participants, sorry me for this words, but he's annoying.
@joubertredrat maybe you understood me wrongly. what i meant is that i literally installed gogs and kept admiring the flexibility but could not work with it meaningfully for almost a year now. Because our jobs require constant update , and we work mobile and cloud. @joubertredrat i know how to wait contrary to the way you paint me, the point is i dont even know how long. its not in any milestone. for so long i have been caught in the middle with my team that i told them we will switch over to gogs by so and so time and by then i will become a lair, in many cases. So please dont get me wrong we are just looking for a work around so to be able to be working with it too
@lavvy you probably didn't checkout the right branch. I have put all my work on this into my master branch for ease. You need to change the gogs remote to use "richmahn" instead of "gogits" (github.com/richmahn/gogs) and the same for the github.com/gogits/git-module package (github.com/richmahn/git-module), not changing the directory structure just the remote URL as you probably know for development. Pull those and try.
@richmahn i probably may not have built it well cos i used docker hub
automated building and i am not too proficient. Please do you have a built
docker image for the fork in the docker hub.
On May 12, 2016 8:29 AM, "Richard Mahn" [email protected] wrote:
@lavvy https://github.com/lavvy you probably didn't checkout the right
branch. I have put all my work on this into my master branch for ease. You
need to change the gogs remote to use "richmahn" instead of "gogits" (
github.com/richmahn/gogs) and the same for the
github.com/gogits/git-module package (github.com/richmahn/git-module),
not changing the directory structure just the remote URL as you probably
know for development. Pull those and try.—
You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub
https://github.com/gogits/gogs/issues/1071#issuecomment-218742112
Please keep the support questions for @richmahn 's fork in.. his fork.. and not here.
There are lots of people following this thread that get notifications each time you post a comment here, so (at least I) would appreciate if you keep the comments here relevant and on topic.
@leitzler thanks for the pointer. thanks
oh thanks @richmahn for the PR #3092 .
@everyone - Ok, I have the online editing feature pretty much done. I finished up being able to know why an error occurred, such as if it failed to create or update your file (file name exists, etc.), and thus rename the file as needed.
Please feel free to checkout my richmahn/gogs and richmahn/git-module forks (need both in your local dev copy) to test. Please the Pull Request for more info and to leave feedback: PR #3092 .
got a little issue editing http://test.door43.org:3000/richgogs/Repo2/edit/master/test
@scher200 This is better discussed in the Pull Request #3092, but I have fixed that so you have to fork. You shouldn't have been able to edit that file of course. (My issue of course is that test.door43.org:3000 is the very place I develop...so I was testing access and thus was allowing you to do that then)
thank you
2016-05-16 17:37 GMT+02:00 Richard Mahn [email protected]:
@scher200 https://github.com/scher200 This is better discussed in the
Pull Request #3092 https://github.com/gogits/gogs/pull/3092, but I have
fixed that so you have to fork. You shouldn't have been able to edit that
file of course.—
You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub
https://github.com/gogits/gogs/issues/1071#issuecomment-219458286
The PR is now #3151
@Unknwon There's also Monaco (MIT licensed): https://github.com/Microsoft/monaco-editor
@Unknwon will @richmahn 's code be merged into the main trunk?
@hellochenwang I can not assure you...
@Unknwon If it means anything, we have been using this in full production now for a month and released a product that had been pretty much been edited and revised through my online web edit feature. I also just updated my branch for it due to changes in gogits/develop due to the diff update. There are a few fixes I just now saw I need to make, like not having the Edit/Create/Upload buttons if viewing a tag. While I am able to use it whether or not you put it into Gogs, I'm sure others would like it. (not sure why yuou wouldn't when Github has it, but you're the boss)
I've now made those other fixes to properly show and not show the Edit/Upload/New File buttons.
@hellochenwang Keep asking. :) I hope more look at this and it gets in. I already am having to keep it updated with other pushes to develop, yet don't know when this much-needed feature will be added.
Two new pull requests have been made for this, to separate the PR into two: PR #3286 and PR #3287
Cannot wait for this comes out to GA. :laughing:
It is possible to test for edit, create and delete files in develop branch or https://try.gogs.io. Merge this thread to https://github.com/gogits/gogs/issues/3460 so we can have a clean place to report issues.
Most helpful comment
@Unknwon If it means anything, we have been using this in full production now for a month and released a product that had been pretty much been edited and revised through my online web edit feature. I also just updated my branch for it due to changes in gogits/develop due to the diff update. There are a few fixes I just now saw I need to make, like not having the Edit/Create/Upload buttons if viewing a tag. While I am able to use it whether or not you put it into Gogs, I'm sure others would like it. (not sure why yuou wouldn't when Github has it, but you're the boss)