显示HN:极简主义编辑器,存于浏览器,所有内容存储在URL中
Show HN: Minimalist editor that lives in browser, stores everything in the URL

原始链接: https://github.com/antonmedv/textarea

## URL Text:一个浏览器内编辑器 URL Text 是一款令人愉悦的、极简主义的文本编辑器,完全在你的浏览器中运行。它的主要特点是:**它直接将整个文档存储在 URL 哈希中!** 这意味着不使用任何后端服务器——一切都在客户端进行。虽然它提供了压缩、深色模式、自动保存和移动设备响应等功能,但分享生成的(可能非常长的)URL 是主要挑战。 本质上,它是一个带有独特存储方法的简单 textarea。你甚至可以自定义页面标题和样式(通过开发者工具),并将这些更改保存在 URL 本身中。数据也会存储在浏览器的 `localStorage` 中作为冗余备份。 它是一个有趣的网页技术实验,非常适合快速笔记或展示浏览器存储的可能性。

Hacker News 新闻 | 过去 | 评论 | 提问 | 展示 | 工作 | 提交 登录 展示 HN:极简编辑器,运行在浏览器中,所有内容存储在 URL 中 (github.com/antonmedv) 13 分,medv 发表于 17 分钟前 | 隐藏 | 过去 | 收藏 | 3 条评论 我想看看在不使用任何框架、存储 API 或构建步骤的情况下,我能用现代浏览器提供的功能构建多远。 它能做什么: 单个 HTML 文件,无依赖,111 行代码 笔记保存在 URL 哈希中(可共享链接!) 使用 CompressionStream 自动压缩 纯文本编辑器 (contenteditable) 历史记录支持 页面标题来自第一个 # 标题 尊重浅色/深色模式 没有存储、cookie 或跟踪 整个应用程序是页面源代码。 https://textarea.my/ nvahalik 发表于 9 分钟前 | 下一个 [–] 顺便说一句,我很喜欢你的其他工具! 回复 deafpolygon 发表于 8 分钟前 | 上一个 [–] 你能保存任何东西吗? 回复 thomascgalvin 发表于 0 分钟前 | 父评论 [–] 当然,只需将其添加书签即可 回复 指南 | 常见问题 | 列表 | API | 安全 | 法律 | 申请 YC | 联系方式 搜索:
相关文章

原文

A minimalist text editor that lives entirely in your browser and stores everything in the URL hash. Yes, you read that right. Your entire novel is now part of the address bar. Good luck sharing that link!

Features (aka things that make this ridiculous)

  • 📝 It's a textarea! Actually not.
  • 🗜️ Compression magic - Your text gets compressed with deflate because we're fancy like that
  • 🔗 URL storage - Share your notes by copying a 500-character URL. Your friends will love it!
  • 🌓 Dark mode - Respects your poor eyes and your color scheme preference
  • 💾 Auto-save - Debounced to 500ms because we're not savages
  • 📱 Mobile friendly - Type your manifesto on the go
  • 🎯 No backend - Zero servers were harmed in the making of this app
  1. Open textarea.my
  2. Type stuff
  3. Marvel at the URL getting longer
  4. Try to share it
  5. ...
  6. Profit
  • Start your document with # Title to set a custom page title
  • Your data lives in localStorage AND the URL. Double the fun!
  • Feeling fancy? Add a style attribute to the <article> tag via DevTools. It'll be saved in the URL too!

Made with ❤️ and JavaScript

联系我们 contact @ memedata.com