Hacker News new | past | comments | ask | show | jobs | submit login
Show HN: Notes.cx – A simple, anonymous online notepad \w Markdown support (notes.cx)
80 points by hxii on July 29, 2021 | hide | past | favorite | 43 comments

You can use your browser as an offline (temporary) text editor, which I find useful with screen sharing.

Enter this into your browser’s address bar:

    data:text/html, <html contenteditable>


and with focus

    data:text/html, <html style=" max-width: 64ch;margin: auto;font-size: calc(1rem + 1vw);line-height: 1.4;font-family: monospace;padding: calc(1rem + 4vw);"><body contenteditable><script>document.addEventListener("DOMContentLoaded", () => {document.body.focus()})</script>

I have this as a bookmarklet and I use it frequently when pairing for ephemeral notes:

    data:text/html, <html contenteditable><head><title>ScratchPad</title><style>body{font-family:monospace}</style></head>
I like having the title so I can see it in the tab and the font setting makes cutting/pasting code look better.

I'm going to get torched for this, but surely Notepad.exe or your-distros-default-text-editor would be easier ?

When screen sharing on a video call, I prefer to only share a private browsing window, rather than the entire desktop.

But to that same point, you can share only your Notepad screen as well...

I mean obviously you could share any number of windows.. but there is still something convenient about sharing a single private browser window.

You can toggle tabs all within the browser, your screen sharing app of choice will be an additional layer of ui to deal with. Not hard, might add just a fraction of a second, but this is nice.

That's odd. I assumed it would act like, well, an input box akin to the one I'm typing this comment in, but it's not. At the very least, Ctrl + Backspace doesn't work (on Firefox on Linux) to delete entire words, which works everywhere else.

Is there something similar that is offline? All I'm interested in is just opening up a bookmark without an internet connection and being able to jot down stuff with Markdown support; it being able to save state is even not necessarily required.

I was bored, here you go! A completely offline browser-based markdown editor!


Edit: Updated styles. Clarified what it is.

Not to pressure but having open/save buttons (implementable either as upload/download Javascript shims) would be interesting. They can also be quine-like (I.e. you save the HTML and Javascript of the editor itself together with the content). I did once that for Suneditor but did not publish it, alas.

No pressure at all! I could just... not think about it if I didn't want to. :p

I took another stab at it and this is what I ended up with: https://gist.github.com/honmanyau/5680d1c7b823d454122a0275ba...

It's now a Gist because I only realised later that the original note will be deleted after 24 hours.

There are now two mechanisms that persist data between sessions:

1. Auto-saving to localStorage every 5000 ms (adjustable as per the instructions). 2. Manual data saving/download implemented using an anchor element that triggers a download. We can now restore markdown by loading a downloaded file (in principle this should work for any plain text file).

One important thing to note here is that localStorage doesn't work in private browsing mode and its behaviour is not entirely consistent between browsers. So I wouldn't rely too much on it!

That's pretty neat! You actually gave me an idea - it'd probably be neat to be able to export a note in HTML/MD.

I love having the document and the app being the same file. No app to find or version skew between app and data.

Excellent. Useful for being on a chromebook, offline and not logged in, so only opening local html files for tools is an option (no Chrome extensions). Will add file saving to my copy.

404. Paid version for longer retention coming soon?

Mn. :( By the time I found out about the 24-hour thing I couldn't edit my original post anymore, the Gist link that I included eventually include for an improved version was also a couple of levels down.

If you are still interested, it can be found here: https://gist.github.com/honmanyau/5680d1c7b823d454122a0275ba...

Your comment about the paid version feels a bit sarcastic, but the whole point was for notes to be temporary.

Though I did think of an option to make the expiry selectable with an option, say, for 2 days.

Stackedit works offline if you install the Chrome app. I assume there's also some way to coax it into working as a file:// uri.

Chrome app: https://chrome.google.com/webstore/detail/stackedit/iiooodel...

Live demo of stackedit: https://stackedit.io/app#

You could try something like this, though it might not have the markdown support you want.


Markdown and offline is always a bit problematic. It's a format that needs to be rendered with a browser, so it's just not very suitable for offline/non-browser use.

> Markdown and offline is always a bit problematic.

That is not true. Markdown has nothing to do with being online.

Telegraph was actually one of the inspirations I used for Notes.cx. However, I didn't use a JavaScript editor (Quill) in my case and I have no idea what the privacy and retention policies are like on Telegra.ph.

this is oddly similar.

As a demonstration, here is a sample note: https://notes.cx/TWuAaH9p

Shameless plug:

If you just need a dead simeple notepad that also works offline, check out https://notepad.js.org

This is slick.

1 suggestion - make a Created (published) note optionally editable... so when the note is originally being edited there is a checkbox to allow it to be editable or not, so once it's published, it's fixed in space and time...

The viewer of an uneditable note can have a button to "Edit a Copy" of the note to create their own version of it and publish it under their own URL, but they can't edit the content of the original one.

NOW you've got yourself a forever tool here.

this looks nice and clean. Generally, the problem with these services is that they can easily be used for malicious purposes -- fronts for data exfiltration, scamming etc., so there will be some cost attached to responding to various queries and takedown requests


From the help page: “every note you create (anonymously) lives for 24 hours”

I'm wondering for other folks that have created tools like this how do you do moderation of anonymous content as I can see this quickly devolving into a cesspool.

The thought of that has held me back from a couple of ideas I've had that allowed for public anonymous text.

(btw, I don't want to get into a discussion about if moderation is needed)

I think that due to the retention policy (24 hours) that I implemented as well as lack of any "social-like" features (likes, upvotes, comments, indexing, visibility), the tool is pretty self-moderating.

That said, I'd love to hear what others think on this subject as well.

I find these super quick note taking tools incredibly handy. I love dillinger.io but I always find myself using docs.new because I can create a note within a second

Feature request: a keyboard shortcut to save or "create", because I'm lazy and scrolling down and clicking create is just too much :)

Keyboard shortcuts are actually something I thought about! I'll have to experiment with this a little bit to see how it can be implemented in a non-obtrusive and useful way.

It would be cool if it has notion like "/" commands to inject codeblocks and other assets.

Nice project!

Thanks! A Notion-like editor is possible (using something like Editor.js - https://editorjs.io/) but would require much more development which would make this project quite a bit more complex :)

I think what would be also cool is this editor in different flavors. For instance, we notion style memo page creator. But with the same editor you can have blog publishing. I always found notion to be very complicated for the simple thing it is supposed to do. I really the interface and experience of this project.

Needs $inline$ and $$block$$ math!

There is a tool out there to combine markup-interpretation and mathjax (IIRC) for $ $ and $$ $$, applying them to the same <textarea> for translation onLoad(). I don't have a name for you right now to search for.

Try looking at this: https://github.com/susam/texme

Discussed here if not more recently: https://news.ycombinator.com/item?id=18307747

Should be fairly easy to add since Parsedown offers support for LaTeX. The thing is - I'd need to add KaTeX. I'll look into it!

there's only one thing that comes to mind when I see the .cx top-level domain.

Christmas Island?

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact