Hello HN,
I hope it will posted as well.
I made a note in single html file.
This does not require a separate membership or installation of the software, and if you download and modify an empty file, you can modify and read it at any time, regardless of online or offline.
It can be shared through messengers such as Telegram, so it is also suitable to share contents with long articles and images.
It is also possible to host and blog because it is static html file content.
The other 90% was all the backend code we had to write to properly synchronize edits across different browsers, each with their own bizarre suite of bugs in their contenteditable implementations :-)
I believe that a lot of problems can be converted into synchronization problems in browsers.
Are there any general synchronization libraries / applications that you suggest within browser / outside browser?
Thanks in advance.
This ends up feeling rather magical to the clients, because they don't need to go to an editing page to make changes before seeing what it will look like. They just literally edit the content in place on the page, and hit save to deploy it live.
Most of these sites are still in operation after 5-10 years and require almost zero maintenance on my end.
Under the hood it was about as shit as every other enterprise CMS of the era, but our users fucking loved it.
https://news.ycombinator.com/item?id=43179649
Turns out that it creates two representations of the PDF content - one is text, which has 0 opacity and another is prerendered image of the same layered on top of it. The latter is what's displayed. So while you can enable contenteditable and get the editing cursor, no changes you make will be shown. Oh, well.
ContentEditable first introduced in ie 5.5 in 2000, available in all major browsers in 2007.
I actually also really like the idea of building simple/local web apps in a single HTML page. A while ago my child and I visited a science museum and played with a simple stop motion animator. I decided to make a web app just like it and built it as a single HTML page, copied it to her laptop and she can use it without internet. I built it using React and a bundler though, because I'm too lazy to write vanilla js. It just bundles into a single HTML file. Maybe I'll post a Show HN some time.
plain, vanilla js and some decent skills will do nearly almost everything in a cleaner and more maintainable way.
after decades of maintaining other people's stuff, dumb design by smart people beats all the other combinations.
Consider changing the behavior so that when the page is opened in the browser from the local disk, then it opens edit mode automatically, but when it's published to someone's website and accessed on the open web (check if the address is http/https), then it's a normal, read-only view expected from most pages.
Of course:
1. there should be a way to override this (a query string param or magic URL fragment) so you can look at it in edit mode, too
2. there should be a blanket exception for certain domains/URL prefixes—defaulting to keepworking.github.io (or <https://keepworking.github.io/nash/>)—so it activates edit mode on that site, too, which means that you personally don't have to do anything special to make the demo work (best if this exception is user-modifiable, so e.g. someone else can get the same behavior if they want without using the trick from #1)
https://news.ycombinator.com/item?id=43179649
I think those two services are more appropriate for the name "Note".
For my project, I should have used Page or Document for the project name.
I know that some people code in an HTML page rendered in Electron, that would be Atom and VS Code and family, but that's far enough from the majority of people that declaring "our code editor" is disingenuous.
Deleted Comment
My Code editor is NeoVim or it's IntelliJ
But there is no HTML page involved at all.
What I want to hint at: You're extrapolating the usage of VSCode.
What blows my mind is that people use frameworks where they include stuff that's not even JS in their HTML, stuff that needs external JS to attach to it or hydrate it. That feels like the worst of both worlds.
I definitely come from an opposite place where JS is king and I don't have any files with an ".html" extension exept for "index.html". And I don't have any HTML in my JS, either. Anything that's a partial template is ".htm" and gets hydrated before it gets added to the DOM.