{"id":24277638,"url":"https://github.com/fsegurai/electron-react-markdown-editor","last_synced_at":"2026-04-11T09:45:21.317Z","repository":{"id":199617922,"uuid":"703287049","full_name":"fsegurai/electron-react-markdown-editor","owner":"fsegurai","description":"Electron Markdown Editor based on React","archived":false,"fork":false,"pushed_at":"2025-03-28T23:15:19.000Z","size":2369,"stargazers_count":2,"open_issues_count":3,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-06T19:55:18.806Z","etag":null,"topics":["codemirror","electron","markdown","react","remark","vite"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/fsegurai.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"contributing.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-10-11T00:52:53.000Z","updated_at":"2025-01-31T16:37:01.000Z","dependencies_parsed_at":"2024-06-25T05:45:37.633Z","dependency_job_id":"5420054c-fff0-4084-a2df-8d64e6232fcf","html_url":"https://github.com/fsegurai/electron-react-markdown-editor","commit_stats":null,"previous_names":["fsegurai/electron-react-markdown-editor"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/fsegurai/electron-react-markdown-editor","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fsegurai%2Felectron-react-markdown-editor","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fsegurai%2Felectron-react-markdown-editor/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fsegurai%2Felectron-react-markdown-editor/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fsegurai%2Felectron-react-markdown-editor/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fsegurai","download_url":"https://codeload.github.com/fsegurai/electron-react-markdown-editor/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fsegurai%2Felectron-react-markdown-editor/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31676210,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-11T08:18:19.405Z","status":"ssl_error","status_checked_at":"2026-04-11T08:17:08.892Z","response_time":54,"last_error":"SSL_read: 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":["codemirror","electron","markdown","react","remark","vite"],"created_at":"2025-01-15T23:58:28.708Z","updated_at":"2026-04-11T09:45:21.291Z","avatar_url":"https://github.com/fsegurai.png","language":"JavaScript","funding_links":["https://www.patreon.com/Kozack/"],"categories":[],"sub_categories":[],"readme":"# Electro Markdown Editor based on React\n\n![screenshot](./doc/fsi_screenshot.png)\n\nA tutorial for building a beautiful Markdown editor\n\n## Stack\n\n- [Electron](https://www.electronjs.org/) - A framework for building cross-platform desktop apps using HTML, JS, and CSS\n- [Vite](https://vitejs.dev/) - A fast build tool\n- React - A library for building UI\n- TypeScript - A typed JavaScript\n- [CodeMirror 6](https://codemirror.net/6/) - An extensible code editor for the web\n- [Remark](https://remark.js.org/) - An extensible Markdown processor\n\n## Get started\n\n```sh\nnpm i\nnpm run watch\n```\n\n## Project Structure\n\nThe structure of this project is very similar to the structure of a monorepo.\n\nThe entire source code of the program is divided into three modules (packages) that are bundled each independently:\n- [`packages/main`](packages/main)\nElectron [**main script**](https://www.electronjs.org/docs/tutorial/quick-start#create-the-main-script-file).\n- [`packages/preload`](packages/preload)\nUsed in `BrowserWindow.webPreferences.preload`. See [Checklist: Security Recommendations](https://www.electronjs.org/docs/tutorial/security#2-do-not-enable-nodejs-integration-for-remote-content).\n- [`packages/renderer`](packages/renderer)\nElectron [**web page**](https://www.electronjs.org/docs/tutorial/quick-start#create-a-web-page).\n\n### Build web resources\n\nPackages `main` and `preload` are built in [library mode](https://vitejs.dev/guide/build.html#library-mode) as it is a simple javascript.\n`renderer` package build as regular web app.\n\nThe build of web resources is performed in the [`scripts/build.js`](scripts/build.js). Its analogue is a sequential call to `vite build` for each package.\n\n### Compile App\nNext step is run  packaging and compilation a ready for distribution Electron app for macOS, Windows and Linux with \"auto update\" support out of the box. \n\n```shell\nnpm run compile\n```\n\nTo do this, using the [electron-builder]:\n- In npm script `compile`: This script is configured to compile the application as quickly as possible. It is not ready for distribution, is compiled only for the current platform and is used for debugging.\n- In GitHub Action: The application is compiled for any platform and ready-to-distribute files are automatically added to the draft GitHub release. \n\n\n### Using Node.js API in renderer\nAccording to [Electron's security guidelines](https://www.electronjs.org/docs/tutorial/security#2-do-not-enable-nodejs-integration-for-remote-content), Node.js integration is disabled for remote content. This means that **you cannot call any Node.js api in the `packages/renderer` directly**. To do this, you **must** describe the interface in the `packages/preload` where Node.js api is allowed:\n```ts\n// packages/preload/src/index.ts\nimport {readFile} from 'fs/promises'\n\nconst api = {\n  readConfig: () =\u003e  readFile('/path/to/config.json', {encoding: 'utf-8'}),\n}\n\ncontextBridge.exposeInMainWorld('electron', api)\n```\n\n```ts\n// packages/renderer/src/App.vue\nimport {useElectron} from '/@/use/electron'\n\nconst {readConfig} = useElectron()\n```\n\n[Read more about Security Considerations](https://www.electronjs.org/docs/tutorial/context-isolation#security-considerations).\n\n**Note**: Context isolation disabled for `test` environment. See [#693](https://github.com/electron-userland/spectron/issues/693#issuecomment-747872160).\n\n\n\n### Modes and Environment Variables\nAll environment variables set as part of the `import.meta`, so you can access them as follows: `import.meta.env`. \n\nYou can also build type definitions of your variables by running `scripts/buildEnvTypes.js`. This command will create `types/env.d.ts` file with describing all environment variables for all modes.\n\nThe mode option is used to specify the value of `import.meta.env.MODE` and the corresponding environment variables files that needs to be loaded.\n\nBy default, there are two modes:\n  - `production` is used by default\n  - `development` is used by `npm run watch` script\n  - `test` is used by `npm test` script\n\nWhen running building, environment variables are loaded from the following files in your project root:\n\n```\n.env                # loaded in all cases\n.env.local          # loaded in all cases, ignored by git\n.env.[mode]         # only loaded in specified env mode\n.env.[mode].local   # only loaded in specified env mode, ignored by git\n```\n\n**Note:** only variables prefixed with `VITE_` are exposed to your code (e.g. `VITE_SOME_KEY=123`) and `SOME_KEY=123` will not.  you can access `VITE_SOME_KEY` using `import.meta.env.VITE_SOME_KEY`. This is because the `.env` files may be used by some users for server-side or build scripts and may contain sensitive information that should not be exposed in code shipped to browsers.\n\n## Author\n\nFabián Segura I ([@fsegurai](https://github.com/fsegurai))\n\n\n[vite]: https://github.com/vitejs/vite/\n[electron]: https://github.com/electron/electron\n[electron-builder]: https://github.com/electron-userland/electron-builder\n[vue]: https://github.com/vuejs/vue-next\n[vue-router]: https://github.com/vuejs/vue-router-next/\n[typescript]: https://github.com/microsoft/TypeScript/\n[spectron]: https://github.com/electron-userland/spectron\n[vue-tsc]: https://github.com/johnsoncodehk/vue-tsc\n[eslint-plugin-vue]: https://github.com/vuejs/eslint-plugin-vue\n[cawa-93-github]: https://github.com/cawa-93/\n[cawa-93-sponsor]: https://www.patreon.com/Kozack/\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffsegurai%2Felectron-react-markdown-editor","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffsegurai%2Felectron-react-markdown-editor","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffsegurai%2Felectron-react-markdown-editor/lists"}