{"id":22488502,"url":"https://github.com/alexherbo2/webextension-editor","last_synced_at":"2025-08-02T21:30:58.859Z","repository":{"id":75997426,"uuid":"222421105","full_name":"alexherbo2/webextension-editor","owner":"alexherbo2","description":"Open an external editor to edit text inputs","archived":false,"fork":false,"pushed_at":"2023-10-21T17:46:11.000Z","size":29,"stargazers_count":4,"open_issues_count":0,"forks_count":3,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-05-21T04:25:01.484Z","etag":null,"topics":["chrome","firefox","webextension"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"unlicense","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/alexherbo2.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING","funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2019-11-18T10:21:30.000Z","updated_at":"2024-05-21T04:25:01.485Z","dependencies_parsed_at":null,"dependency_job_id":"1a4c2571-5bfa-4b9f-b78a-bc8b68ec6eab","html_url":"https://github.com/alexherbo2/webextension-editor","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alexherbo2%2Fwebextension-editor","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alexherbo2%2Fwebextension-editor/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alexherbo2%2Fwebextension-editor/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alexherbo2%2Fwebextension-editor/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/alexherbo2","download_url":"https://codeload.github.com/alexherbo2/webextension-editor/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":228500241,"owners_count":17930015,"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":["chrome","firefox","webextension"],"created_at":"2024-12-06T17:17:50.983Z","updated_at":"2024-12-06T17:20:15.107Z","avatar_url":"https://github.com/alexherbo2.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Editor for [Chrome] and [Firefox] – [WebExtensions]\n\n[Chrome]: https://google.com/chrome/\n[Firefox]: https://mozilla.org/firefox/\n[WebExtensions]: https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions\n\n\u003cimg src=\"https://github.com/FortAwesome/Font-Awesome/raw/master/svgs/solid/edit.svg\" height=\"16\" align=\"right\"\u003e\n\nOpen an external editor to edit text inputs.\n\n## Dependencies\n\n- [jq]\n\n[jq]: https://stedolan.github.io/jq/\n\n###### Extensions\n\n- [Shell]\n\n[Shell]: https://github.com/alexherbo2/webextension-shell\n\n## Installation\n\n###### Chrome\n\n``` sh\nmake chrome\n```\n\nOpen the _Extensions_ page by navigating to `chrome://extensions`, enable _Developer mode_ then _Load unpacked_ to select the extension directory: `target/chrome`.\n\n###### Firefox\n\n``` sh\nmake firefox\n```\n\n- Open `about:config`, change `xpinstall.signatures.required` to `false`.\n- Open `about:addons` ❯ _Extensions_, click _Install add-on from file_ and select the package file: `target/firefox/package.zip`.\n\n## Configuration\n\n###### Chrome\n\nOpen `chrome://extensions/configureCommands` to configure the keyboard shortcuts.\n\n###### Firefox\n\nOpen `about:addons` ❯ _Extensions_ and click _Manage extension shortcuts_ in the menu.\n\n## Usage\n\nPress \u003ckbd\u003eControl\u003c/kbd\u003e + \u003ckbd\u003ei\u003c/kbd\u003e to edit the last used text input with your favorite editor.\n\n## Commands\n\n###### `edit`\n\nEdit the last used text input with your favorite editor.\nDefault: \u003ckbd\u003eControl\u003c/kbd\u003e + \u003ckbd\u003ei\u003c/kbd\u003e.\n\n## Options\n\n###### `editor`\n\nSets the editor to be used.\n\nParameters:\n\n- `file`\n- `anchor_line`\n- `anchor_column`\n- `cursor_line`\n- `cursor_column`\n\nDefault: `xterm -e \"$EDITOR\" \"${file}\"`.\n\n**Example** – Open [Kakoune] in [Alacritty]:\n\n``` sh\nalacritty --class 'popup' --command \\\n  kak \"${file}\" -e \"\n    select ${anchor_line}.${anchor_column},${cursor_line}.${cursor_column}\n  \"\n```\n\n[Kakoune]: https://kakoune.org\n[Alacritty]: https://github.com/alacritty/alacritty\n\n## Cross-extension messaging\n\n``` javascript\n// Environment variables\nswitch (true) {\n  case (typeof browser !== 'undefined'):\n    var PLATFORM = 'firefox'\n    var EDITOR_EXTENSION_ID = 'editor@alexherbo2.github.com'\n    break\n  case (typeof chrome !== 'undefined'):\n    var PLATFORM = 'chrome'\n    var EDITOR_EXTENSION_ID = 'oaagifcpibmdpajhjfcdjliekffjcnnk'\n    break\n}\n\n// Initialization\nconst editor = {}\neditor.port = chrome.runtime.connect(EDITOR_EXTENSION_ID)\neditor.send = (command, ...arguments) =\u003e {\n  editor.port.postMessage({ command, arguments })\n}\n\n// Usage\neditor.send('edit')\n```\n\nYou can find some examples in [Krabby].\n\n[Krabby]: https://krabby.netlify.app\n\nSee the [source](src) for a complete reference.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falexherbo2%2Fwebextension-editor","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Falexherbo2%2Fwebextension-editor","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falexherbo2%2Fwebextension-editor/lists"}