Show HN: Poor man's Google Docs
github.com
github.com
For an even-poorer-man's google docs, I like to keep this bookmarked:
data:text/html, <html contenteditable>
If you navigate to that string in your browser it gives you a blank, editable page. No saving or any fancy features, but it is pretty convenient to be able to quickly spin up a scratch pad sometimes. window.location = "data:text/html," + document.documentElement.outerHTML
functioning as a kind of lame save buttonYou could add a onbeforeunload handler to prevent that. You'll immediately recognize it from every other annoying web page that adds uses.
[1]: https://developer.mozilla.org/en-US/docs/Web/API/WindowEvent...
I can't find the link at the moment, but I think it's interesting because despite it being the simple solution, they eventually realized it was holding back adoption amongst business users.
Edit: Found the article: "Babe Ruth and Feature Lists" [0] where former Google PDM Ken Norton writes:
>We were relying on the browser’s rich text surface, which used HTML as the underlying data format and caused browser compatibility nightmares. You’d bold a word and then be unable to un-bold it. Bulleted lists couldn’t be edited or deleted without screwing up the whole page or turning everything into a bullet. Centering a line would often center-align the entire document. Formatting bugs had been an annoyance for Googlers, but they were fatal for groups of students who needed to print a term paper to a teacher’s exacting specifications.
0 - https://library.gv.com/babe-ruth-and-feature-lists-1818bb8c6...
This project is mainly targeted at presenting (read-only) documents, which includes displaying and printing invoices etc. I admit, the project description could have made this clearer.
Basic editing is possible, which is why it's a poor man's Google Docs. Styling is possible as well, if you don't try to bold/unbold randomly, etc.
So for presenting read-only documents, this has zero of the problems that Google Docs had and the project can safely continue to use the DOM and "contenteditable".
Please see my comment on the parent to your post for a response.
> No JavaScript?
And even these keyboard shortcuts work, at least in Chrome:Ctrl B: bold
Ctrl I: italic
Ctrl U: underline
My point is that not everyone has those features out of the box. Sure, you can install more software, but it's not a reason to not have a feature like that in this word processor.
Printing is the responsibility of the platform, not the application.
Something something Zawinski's Law.
Now matter how you look at it, it's not a feature that applications have to bother with reinventing.
Anyway, if your operating system comes with a PDF printer or if you installed one manually, you can use the normal printing feature that every browser has.
https://developer.mozilla.org/en-US/docs/Web/API/Window/prin...
But isn't it skeumorphic to have pages based off of real paper sizes?
It's quite hilarious to see how a certain class of developers think (or portray) that something is skeuomorphic, and therefore, undesirable, when in fact there is nothing (zilch!) in software that is not stemmed on skeumorphic thinking.
Starting from Object Oriented Programming to visual design, everything in software is a skeuomorphic inspiration of what we have experienced offline before.
For example: The web scroll is a direct skeuomorphic rip-off of physical scrolls from back in the day! In fact between paginated page-flips of modern physical books and scrollbooks or yesteryears, scrolling is probably the older of the two technologies. Then we have paper-like pages in MS Word or Google Docs with page-breaks in them!
The mobile dial-pad is a cute skeuomorphic rip-off of physical buttoned dial-pads on phones. iWatch/digital watches still do good with clock needles the way physical ones always did. Button, shadow, gradients, flat buttons, round buttons, corner elements, form design and pretty much everything in "good design" are all grounded on, in principle, skeuomorphism.
Hell, we even copied the scrolling momentum!
It's a fact: any ego-strut or marketing-speak from anybody in software that says some "design" is original and not skeuomorphic is simply selling bullshit.
Instead, it has been added only to disassociate from a HTML/CSS imitation of paper (the material) by itself, which quite a few people have been expecting, given the (improvable) title of this project.
Assuming that digital screens cannot truly be produced using cellulose and starch (the material) the dissociation and difference in the nature of medium is understood. And then the "software part" has absolutely no role to play in that dissociation.
You can't evade the fact that it is just marketing-speak at every level. I am pretty sure that the dev community likes to believe otherwise, and hence the downvotes, but that's just lame groupthink anyway.
Except that it does resemble a plain A4 loose sheet of paper -skeuomorphically! :)
What, then, would skeumorphic paper be?
This was actually only added to underline that there's nothing like [1] in this project. Will improve the README.
Good design is one where a user doesn't lose focus from the task they had on their mind -- be it in physical realm or software. In fact for this reason alone there is no well-designed software in the world, anywhere, that doesn't rely on skeuomorphism at its core.
Does this do that?
It doesn't do this yet, because the focus here has been on perfect representation of pages via CSS.
But using socket.io or something like this, it shouldn't be thard hard.
Not sure if I'll be working on this, though, because there are so many (commercial) services providing this already. Sure, you might think that Google Docs could be more lightweight and elegant, but for many people it's working fine and that 10% improvement on Google Docs is definitely too much work for a tiny open-source project.
I was talking about basic functionality, just as you were in your first comment. The title of this contribution didn't talk about a poor man's Google Docs by chance.
Why ContentEditable Is Terrible, Or: How the Medium Editor Works (2014) (medium.com) https://news.ycombinator.com/item?id=11487667
You might not have looked at this closely enough, but "contenteditable" is really only one line that has been added to make the demo more useful.
The real thing this is about is the CSS. There are ~250 lines that produce the correct page sizes, margins and paged content and ensure that prints are as expected.
Is that a bug, or is it not intended to work that way?
This does only affect the "in-browser" view. In the print view, everything is correct.
Yet, you're right in that this just isn't acceptable. The "preview" mode in the browser should work exactly like the print mode here.
This is a known issue and had already been tracked here: https://github.com/delight-im/HTML-Sheets-of-Paper/issues/2