Add Search Service

by typora.io

User can add custom search engine to extend functions shown in context menu.

Slice 2

macOS

There is a system wide preference to change available search engines in context menu for most applications. You would find the settings here:

Snip20160815_11

Windows

(Requires Typora ≥ v0.9.16)

  1. Open MenuPreference in Typora, then click “Open Advanced Settings”.

    sshot-1

  2. Open and edit conf.user.json from opened “File Explore”. If there’s no such file, create one.

  3. Modify or set following config into the conf.user.json file, %s will represent the selected text. for example:

    "searchService": [
        ["Search with Google", "https://google.com/search?q=%s"],
        ["Translate", "http://translate.google.com/?source=osdd#auto|auto|%s"]
        ["Search with Wikipedia", "https://en.wikipedia.org/wiki/Special:Search/%s"]
      ]
    

    Note: Default config is:

    "searchService": [
        ["Search with Google", "https://google.com/search?q=%s"],
      ]
    
  4. Restart Typora, options from searchService will be available in context menu.