{"id":18483285,"url":"https://github.com/cloudcmd/deepword","last_synced_at":"2025-05-11T04:28:10.733Z","repository":{"id":149037047,"uuid":"69975413","full_name":"cloudcmd/deepword","owner":"cloudcmd","description":"Web editor based on Monaco","archived":false,"fork":false,"pushed_at":"2024-04-03T06:35:46.000Z","size":427,"stargazers_count":31,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-05-11T04:27:32.013Z","etag":null,"topics":["cloudcmd","editor","expressjs","middleware","monaco","nodejs"],"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/cloudcmd.png","metadata":{"files":{"readme":"README.md","changelog":"ChangeLog","contributing":null,"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}},"created_at":"2016-10-04T14:51:27.000Z","updated_at":"2024-02-02T16:19:48.000Z","dependencies_parsed_at":null,"dependency_job_id":"c2f60417-40ad-418c-bc1b-20d94a7aaf4b","html_url":"https://github.com/cloudcmd/deepword","commit_stats":null,"previous_names":[],"tags_count":131,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cloudcmd%2Fdeepword","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cloudcmd%2Fdeepword/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cloudcmd%2Fdeepword/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cloudcmd%2Fdeepword/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cloudcmd","download_url":"https://codeload.github.com/cloudcmd/deepword/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253518954,"owners_count":21921074,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["cloudcmd","editor","expressjs","middleware","monaco","nodejs"],"created_at":"2024-11-06T12:35:05.305Z","updated_at":"2025-05-11T04:28:10.712Z","avatar_url":"https://github.com/cloudcmd.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Deepword [![License][LicenseIMGURL]][LicenseURL] [![NPM version][NPMIMGURL]][NPMURL] [![Build Status][BuildStatusIMGURL]][BuildStatusURL] [![Coverage Status][CoverageIMGURL]][CoverageURL]\n\n[NPMIMGURL]: https://img.shields.io/npm/v/deepword.svg?style=flat\n[BuildStatusURL]: https://github.com/cloudcmd/deepword/actions?query=workflow%3A%22Node+CI%22 \"Build Status\"\n[BuildStatusIMGURL]: https://github.com/cloudcmd/deepword/workflows/Node%20CI/badge.svg\n[LicenseIMGURL]: https://img.shields.io/badge/license-MIT-317BF9.svg?style=flat\n[NPM_INFO_IMG]: https://nodei.co/npm/deepword.png?downloads=true\u0026\u0026stars\u0026\u0026downloadRank \"npm install deepword\"\n[NPMURL]: https://npmjs.org/package/deepword \"npm\"\n[LicenseURL]: https://tldrlegal.com/license/mit-license \"MIT License\"\n[CoverageURL]: https://coveralls.io/github/cloudcmd/deepword?branch=master\n[CoverageIMGURL]: https://coveralls.io/repos/cloudcmd/deepword/badge.svg?branch=master\u0026service=github\n\nWeb editor used in [Cloud Commander](http://cloudcmd.io) based on [Monaco](https://microsoft.github.io/monaco-editor/ \"Monaco\").\n\n![Deepword](https://raw.githubusercontent.com/cloudcmd/deepword/master/img/deepword.png \"Deepword\")\n\n## Features\n\n- Syntax highlighting based on extension of file for over 30 languages.\n- Configurable options ([edit.json](json/edit.json) could be overriden by `~/.deepword.json`) according to [monaco editor options](https://microsoft.github.io/monaco-editor/api/interfaces/monaco.editor.ieditoroptions.html)\n\n## Install\n\n```\nnpm i deepword -g\n```\n\n![NPM\\_INFO][NPM_INFO_IMG]\n\n## Command line parameters\n\nUsage: `deepword [filename]`\n\n|Parameter              |Operation\n|:----------------------|:--------------------------------------------\n| `-h, --help`          | display help and exit\n| `-v, --version`       | output version information and exit\n\n## Hot keys\n\n|Key                    |Operation\n|:----------------------|:--------------------------------------------\n| `Ctrl + s`            | save\n| `Ctrl + f`            | find\n| `Ctrl + h`            | replace\n| `Ctrl + g`            | go to line\n| `Ctrl + e`            | evaluate (JavaScript only supported)\n\nFor more details see [Ace keyboard shortcuts](https://github.com/ajaxorg/ace/wiki/Default-Keyboard-Shortcuts \"Ace keyboard shortcuts\").\n\n## Options\n\nYou can override [monaco editor options](https://microsoft.github.io/monaco-editor/api/interfaces/monaco.editor.ieditoroptions.html) in `~/.deepword.json`.\n\n### Theme\n\nTo override `theme` use `theme` options in `~/.deepword.json`. Themes can be:\n\n- `vs`\n- `vs-dark`\n\n## API\n\nDeepword could be used as middleware for [express](http://expressjs.com \"Express\").\nFor this purpuse API could be used.\n\n### Server\n\n#### deepword(options)\n\nMiddleware of `deepword`. Options could be omitted.\n\n```js\nimport deepword from 'deepword';\nimport express from 'express';\n\nconst app = express();\n\napp.use(deepword({\n    root: '/', // default\n    diff: true, // default\n    zip: true, // default\n    dropbox: false, // optional\n    dropboxToken: 'token', // optional\n}));\n\napp.listen(31_337);\n```\n\n#### deepword.listen(socket)\n\nCould be used with [socket.io](http://socket.io \"Socket.io\") to handle editor events with.\n\n```js\nimport {Server} from 'socket.io';\nconst socket = new Server(server);\n\ndeepword.listen(socket, {\n    prefixSocket: '/deepword', // optional\n    auth: (accept, reject) =\u003e (username, password) =\u003e {\n        // optional\n        accept();\n    },\n});\n```\n\n### Client\n\nDeepword uses [Monaco](https://microsoft.github.io/monaco-editor/ \"Monaco\") on client side, so API is similar.\nAll you need is put minimal `html`, `css`, and `js` into your page.\n\nMinimal html:\n\n```html\n\u003cdiv class=\"edit\" data-name=\"js-edit\"\u003e\u003c/div\u003e\n\u003cscript src=\"/deepword/deepword.js\"\u003e\u003c/script\u003e\n```\n\nMinimal css:\n\n```css\nhtml, body, .edit {\n    height: 100%;\n    width: 100%;\n}\n\nbody {\n    margin: 0;\n}\n\n.edit {\n    overflow: hidden;\n}\n\n```\n\nMinimal js:\n\n```js\ndeepword('[data-name=\"js-edit\"]', (editor) =\u003e {\n    editor.setValue('Hello deepword!');\n});\n```\n\nFor more information you could always look into `html` and `bin` directory.\n\n## Related\n\n- [Edward](https://github.com/cloudcmd/edward \"Edwdard\") - web editor based on [Ace](https://ace.c9.io \"Ace\").\n- [Dword](https://github.com/cloudcmd/dword \"Dword\") - web editor based on [Codemirror](https://codemirror.net \"Codemirror\").\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcloudcmd%2Fdeepword","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcloudcmd%2Fdeepword","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcloudcmd%2Fdeepword/lists"}