{"id":19838142,"url":"https://github.com/textlint/editor","last_synced_at":"2025-05-16T06:06:49.762Z","repository":{"id":49168726,"uuid":"282607349","full_name":"textlint/editor","owner":"textlint","description":"textlint editor project.","archived":false,"fork":false,"pushed_at":"2024-12-10T23:43:55.000Z","size":3622,"stargazers_count":136,"open_issues_count":23,"forks_count":10,"subscribers_count":7,"default_branch":"master","last_synced_at":"2025-05-01T04:39:53.107Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://textlint-editor.netlify.app/","language":"TypeScript","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/textlint.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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,"publiccode":null,"codemeta":null}},"created_at":"2020-07-26T08:23:28.000Z","updated_at":"2025-03-15T20:12:22.000Z","dependencies_parsed_at":"2024-01-02T13:53:35.517Z","dependency_job_id":"d77ad74f-47bf-4778-983c-b38a290340f9","html_url":"https://github.com/textlint/editor","commit_stats":{"total_commits":272,"total_committers":7,"mean_commits":"38.857142857142854","dds":"0.13235294117647056","last_synced_commit":"2a37e6c9a2310b30afbf87e72cb6f03925b15981"},"previous_names":[],"tags_count":46,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/textlint%2Feditor","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/textlint%2Feditor/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/textlint%2Feditor/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/textlint%2Feditor/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/textlint","download_url":"https://codeload.github.com/textlint/editor/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253663513,"owners_count":21944263,"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":[],"created_at":"2024-11-12T12:16:53.077Z","updated_at":"2025-05-16T06:06:44.735Z","avatar_url":"https://github.com/textlint.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# @textlint/editor\n\ntextlint editor is privacy first linting tool on your browser.\n\n## Usage\n\n1. Install Web Extensions\n    - [x] Chrome: \u003chttps://chrome.google.com/webstore/detail/textlint-editor/gfhlfpnpjokocfohicmfbgjneiipfeil\u003e\n    - [x] ~Firefox: \u003chttps://addons.mozilla.org/ja/firefox/addon/textlint-editor/\u003e~ See [#61](https://github.com/textlint/editor/issues/61)\n2. Install your favorites textlint worker scripts\n    - Example textlint worker scripts:\n    - \u003chttps://azu.github.io/textlintrc/\u003e\n    - \u003chttps://textlint-ja.github.io/textlint-rule-preset-japanese/\u003e\n    - \u003chttps://textlint-ja.github.io/textlint-rule-preset-ja-technical-writing/\u003e\n3. Finally, you can linting any supported textarea with your textlint worker script\n\n:memo: @textlint/editor web extension hook the access of `https://*/*/textlint-worker.js`. If you navigate\nto `https://*/*/textlint-worker.js`, the web extension open installation dialog like Greasemonkey Extension.\n\n:memo: You want to use your customized rule, please use \u003chttps://github.com/textlint/editor-script-template\u003e.\n\n## Supports textarea\n\n- [x] textarea\n- [ ] contenteditable\n- [ ] Google Docs\n- [ ] Twitter\n- [ ] Medium\n- [ ] Wordpress\n- [ ] CodeMirror\n- [ ] ACE\n\nIf you want to support new textarea, please create an issues or pull request\nto [textchecker-element](./packages/textchecker-element).\n\n## Purpose\n\n- Privacy first\n    - Offline works\n- Create own textlint that is bundled with own configuration\n    - Optimize your needs\n    - [@textlint/script-compiler](packages/@textlint/script-compiler) is code generator\n\n[Grammarly](https://grammarly.com/) and [Microsoft Editor](https://www.microsoft.com/microsoft-365/microsoft-editor) is\nuseful and high-quality linting tools, but these require network access, and you must pass your text to their server.\n\n[textlint](https://github.com/textlint/textlint) can be works at offline. Because, textlint is written by JavaScript,\ntextlint rules are also written by JavaScript.\n\nHowever, textlint is pluggable linting tools and textlint can not provide recommended/default ruleset.\n\n@textlint/editor project resolve this issue using [@textlint/script-compiler](packages/@textlint/script-compiler) that\ngenerate optimized code from your textlint configuration.\n\n![Architecture](docs/resources/textlint_editor.png)\n\n\u003c!-- https://excalidraw.com/#json=5173529272123392,zEJpgAvspIPHh-IExwh69w --\u003e\n\nFor example, WebExtension download own optimized textlint that is generated\ncode [@textlint/script-compiler](packages/@textlint/script-compiler), and use it for linting.\n\nSo, we can focus on the compiler and frontend of editor.\n\n## Develop\n\nInstall with yarn and build before editing files.\n\n    yarn install\n    yarn run build\n    cd packages/you want to edit\n\n### Develop web extension\n\n    yarn install\n    yarn run build\n    cd packages/webextension\n    yarn dev chrome # yarn dev firefox\n\n## Architecture\n\n- FrontEnd\n    - [textchecker-element](packages/textchecker-element) is general web component implementation.\n    - Injectable code\n    - View\n    - multiple implementations\n    - For VSCode, TextArea, Google Docs\n- BackEnd\n    - Web Extension: background.js\n    - Server: API server\n    - Web Worker: thread\n    - spellchecker backend api\n\nFrontEnd and BackEnd is separated.\n\n### WebComponent\n\nAvoid side-effect on website.\n\n- TextChecker\n- Controller\n- Portal Overlay\n\n### Compiler target\n\n[@textlint/script-compiler](packages/@textlint/script-compiler) generate bundled JavaScript code.\n\nCompiler compilertextlint + rule + textlintrc into a single library code.\n\n- Chrome Extension code\n    - chrome.storage.local for cache\n    - libraryTarget:\n- Web Worker code\n    - kvstorage cache\n    - libraryTarget: self\n- Main Thread code(just web)\n    - kvstorage cache\n    - libraryTarget: web\n\nAlso, We can provide [@textlint/script-compiler](packages/@textlint/script-compiler) as a service\nusing [codesandbox](https://codesandbox.io)\n\n### API\n\nThe library has some API\n\n- update(config): Promise\u003cvoid\u003e\n    - dynamic update textlintrc config\n- lint({text:string}): { range: [number, number], message: string, suggestions: suggesionItem[] };\n- fix({ range: [number,number] }): string;\n- suggest({ range: [number, numbe })`\n    - missing parts of textlint\n- `ignore({ word:string }): Promise\u003cvoid\u003e`\n    - [textlint-filter-rule-allowlist](https://github.com/textlint/textlint-filter-rule-allowlist) configuration?\n\n## Changelog\n\nSee [Releases page](https://github.com/textlint/editor/releases).\n\n## Running tests\n\nInstall devDependencies and Run `npm test`:\n\n    npm test\n\n## Contributing\n\nPull requests and stars are always welcome.\n\nFor bugs and feature requests, [please create an issue](https://github.com/textlint/editor/issues).\n\n1. Fork it!\n2. Create your feature branch: `git checkout -b my-new-feature`\n3. Commit your changes: `git commit -am 'Add some feature'`\n4. Push to the branch: `git push origin my-new-feature`\n5. Submit a pull request :D\n\n## Author\n\n- [github/azu](https://github.com/azu)\n- [twitter/azu_re](https://twitter.com/azu_re)\n\n## License\n\nMIT © azu\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftextlint%2Feditor","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftextlint%2Feditor","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftextlint%2Feditor/lists"}