{"id":19562084,"url":"https://github.com/t-eckert/minnote","last_synced_at":"2026-04-01T21:50:08.630Z","repository":{"id":48873318,"uuid":"382655728","full_name":"t-eckert/minnote","owner":"t-eckert","description":"A small, local text editor for the web.","archived":false,"fork":false,"pushed_at":"2021-10-27T02:24:41.000Z","size":103,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-03-27T13:43:32.928Z","etag":null,"topics":["minimal-apps","note-taking","typescript","vite"],"latest_commit_sha":null,"homepage":"https://minnote.io/","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/t-eckert.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-07-03T16:01:14.000Z","updated_at":"2024-09-12T23:28:06.000Z","dependencies_parsed_at":"2022-08-31T16:31:08.024Z","dependency_job_id":null,"html_url":"https://github.com/t-eckert/minnote","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/t-eckert/minnote","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/t-eckert%2Fminnote","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/t-eckert%2Fminnote/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/t-eckert%2Fminnote/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/t-eckert%2Fminnote/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/t-eckert","download_url":"https://codeload.github.com/t-eckert/minnote/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/t-eckert%2Fminnote/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31046850,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-27T09:35:52.079Z","status":"ssl_error","status_checked_at":"2026-03-27T09:35:20.916Z","response_time":164,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["minimal-apps","note-taking","typescript","vite"],"created_at":"2024-11-11T05:13:24.210Z","updated_at":"2026-04-01T21:50:08.588Z","avatar_url":"https://github.com/t-eckert.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ![Minnote icon](favicon.png) [Minnote](https://minnote.io/)\n\nA small, local text editor in the browser.\n\n### Clone repo and run locally with yarn\n\n```bash\ngit clone https://github.com/t-eckert/minnote.git\ncd minnote\nyarn\nyarn dev\n```\n\nThis will tell [Vite](https://vitejs.dev/) to run the project and serve it to `localhost:3000`.\n\n```\n  \u003e Local: http://localhost:3000/\n  \u003e Network: use `--host` to expose\n```\n\n### Run locally with npm instead of yarn\n\n```bash\nnpm i\nnpm run dev\n```\n\n## Page hooks\n\nThe application is separated into hooks for:\n* Entering text with `textbox`\n* Copying text to the clipboard with `copy`\n* Toggling the `menu` with `menuToggle`\n* Saving the text to `localStorage` with `storage`\n\n```ts\nconst textbox = document.getElementById(\"textbox\") as HTMLTextAreaElement | null\nconst copy = document.getElementById(\"copy\") as HTMLButtonElement\nconst menu = document.getElementById(\"menu\")\nconst menuToggle = document.getElementById(\"menu-toggle\") as HTMLButtonElement | null\nconst storage = window.localStorage\n```\n\n## State\n\nThe initial state of the menu is set to `closed`.\n\n```ts\nconst key = \"textbox\"\nlet menuState: MenuState = \"closed\"\n```\n\n## Actions\n\nActions include:\n* Handling storage with `saveToStorage`, `loadFromStorage`, `save`, and `load`\n* Handling the clipboard with `copyToClipboard` and `copyToClipboardFallback`\n* Handling menu state with `toggleMenu`\n\n### Storage actions\n\n```ts\nconst saveToStorage = (key: string, text: string) =\u003e {\n  storage.setItem(key, text)\n}\n\nconst loadFromStorage = (key: string): string | null =\u003e {\n  return storage.getItem(key)\n}\n\nconst save = (textbox: HTMLTextAreaElement) =\u003e {\n  saveToStorage(key, textbox.value)\n}\n\nconst load = (textbox: HTMLTextAreaElement) =\u003e {\n  textbox.value = loadFromStorage(key) || \"\"\n}\n```\n\n### Clipboard actions\n\n```ts\nconst copyToClipboard = (text: string) =\u003e {\n  if (!navigator.clipboard) {\n    copyToClipboardFallback(text);\n    return;\n  }\n\n  navigator.clipboard.writeText(text).then(function () {\n  }, function (_) {\n  });\n}\n\nconst copyToClipboardFallback = (text: string) =\u003e {\n  var textArea = document.createElement(\"textarea\");\n  textArea.value = text;\n\n  textArea.style.top = \"0\";\n  textArea.style.left = \"0\";\n  textArea.style.position = \"fixed\";\n\n  document.body.appendChild(textArea);\n  textArea.focus();\n  textArea.select();\n\n  try {\n    document.execCommand('copy');\n  }\n  finally {\n    document.body.removeChild(textArea);\n  }\n}\n```\n\n### Menu action\n\n```ts\nconst toggleMenu = () =\u003e {\n  if (menu \u0026\u0026 menuState === \"closed\") {\n    menu.hidden = false\n    menuState = \"opened\"\n  } else if (menu \u0026\u0026 menuState === \"opened\") {\n    menu.hidden = true\n    menuState = \"closed\"\n  }\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ft-eckert%2Fminnote","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ft-eckert%2Fminnote","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ft-eckert%2Fminnote/lists"}