Closed bifurcation closed 5 years ago
That looks pretty cool. Multi file documents can work as well with this setup?
On Sun, 7 Jul 2019, 03:18 Richard Barnes, notifications@github.com wrote:
My earlier work on draftr https://ipv.sx/draftr and draftr-js https://draftr-js.github.io was pretty half-hearted, but the "no install" experience has been useful to a few people. It would be nice, though, if we could have a web-based Internet-draft authoring tool that kept pace with the more real tooling -- mmark.
This PR is a proof of concept for how this could be done fairly simply using GopherJS. To see how this works:
go get -u github.com/gopherjs/gopherjs cd ${GOPATH}/src/github.com/mmarkdown/mmark/js gopherjs serve
In browser opened to http://localhost:8080/github.com/mmarkdown/mmark/js
Open browser console, and:
doc = mmark.NewDocument(mmark.SampleData) html = doc.HTMLFragment()
You can view, comment on, or merge this pull request online at:
https://github.com/mmarkdown/mmark/pull/79 Commit Summary
- First pass at GopherJS integration
File Changes
- A js/main.go https://github.com/mmarkdown/mmark/pull/79/files#diff-0 (132)
Patch Links:
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/mmarkdown/mmark/pull/79?email_source=notifications&email_token=AACWIW734T7W3YLIHKB2Z5TP6E767A5CNFSM4H6USHD2YY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4G5V4DEQ, or mute the thread https://github.com/notifications/unsubscribe-auth/AACWIW3SJFCTMDWI6BIDK5TP6E767ANCNFSM4H6USHDQ .
@miekg My proposal is that we do not support multi-file documents in this interface. Seems simpler.
Latest commit adds a simple web interface adapted from draftr-js. Once you have gopherjs serve
running, you should be able to go to http://localhost:8080/github.com/mmarkdown/mmark/js
and get a two-panel view that auto-updates the HTML as you edit the MD.
It seems like the TODO to get this to a usable state would be something like:
There is no reason why this code should live in this repository, happy to make a mmarkdown/js repo so we can put it there?
The main reason I started here was ease of keeping it up to date. If the web code is in this repo (say in the gh-pages branch), then it's easy to set CI triggers that update the JS to match the current Go code. (cf. the work Martin has done with Internet-drafts) It's probably possible to set something up across repos, just a bit more complicated.
[ Quoting notifications@github.com in "Re: [mmarkdown/mmark] WIP: GopherJS..." ]
It's probably possible to set something up across repos, just a bit more complicated.
good :-) Because there is no real reason to have it live here.
Closing as this does not need to live in the main repo.
My earlier work on draftr and draftr-js was pretty half-hearted, but the "no install" experience has been useful to a few people. It would be nice, though, if we could have a web-based Internet-draft authoring tool that kept pace with the more real tooling -- mmark.
This PR is a proof of concept for how this could be done fairly simply using GopherJS. To see how this works: