Skip to content

asamuzaK/withExEditorHost

Repository files navigation

EN | JA

build CodeQL npm release

withExEditorHost

Native messaging host for browser extension withExEditor. The browser interacts with the host via messages, and the editor is executed by this host.

Supported browsers

Browser Windows Linux Mac
Firefox
Waterfox Current
LibreWolf ✓ *1
Chrome
Chrome Beta ✓ *2
Chrome Canary ✓ *2
Chromium
Brave ✓ *2
Edge
Opera ✓ *2 ✓ *2
Vivaldi ✓ *2

*1: Shares host with Firefox. *2: Shares host with Chrome.

If your browser is not listed or OS for that browser is left blank, file an issue for adding support. When filing an issue, if you know where to save the application manifest in that browser, please let me know.

Host setup

NOTE: If you already have Node.js installed, it is recommended to get the host from npm. Also, if you are using 32bit Windows or 32bit Linux, please install Node.js and get the host from npm. Refer to Host setup from npm below.

When setting up the host, disable withExEditor installed in the browser.

Download a zip file (a tar.gz file on Linux / Mac) for your OS from Releases, after decompressing, save it in an arbitrary place under your home directory (for example, C:\Users\XXX\withExEditorHost\).

Next, open "cmd.exe" on Windows, "terminal" on Linux / Mac, change directory to where you saved withExEditorHost, execute the following command.

cd path/to/withExEditorHost
index setup

Then you will be asked which browser you want to setup the host for, so please select from the browsers listed.

After that, you will be prompted for the following, please input as appropriate.

  • Enter editor path
  • Enter command line options
    • NOTE: Quote the argument if it contains spaces or backslashes. For example: -a -b "C:\Program Files"
    • NOTE: You can use the temporary file placeholder ${file} in the arguments. For example: -a ${file} -b

If config files are created successfully, enable withExEditor again. The browser and the host get connected and the editor will be ready to use.

NOTE: If you have enabled Mandatory Access Control (for example, AppArmor) for your web-browser, ensure the profile allows the withexeditorhost.sh script to be executed.

Options

In the setup script you can specify some options.

-b --browser

To specify the browser, please use -b or --browser option.

index setup --browser=firefox

-c --config-path