AI Write Supporter

Release 2.17.0+

Note: For Release 2.18.0 / 3.0.0 and above, see the new setup format: Setup for 2.18.0 / 3.0.0+.

A plugin that integrates generative AI for automated content authoring. Generate draft business content or edit text efficiently from within the editor.

1.00

Sub-pages

Supported Browsers

  • Microsoft Edge (latest)
  • Google Chrome (latest)
  • Apple Safari (latest)
  • Other browsers may work but not all features are guaranteed.
  • Internet Explorer is not supported.

Setup

The SynapEditor object must exist before the plugin can be applied, so include the plugin files below the editor script files.

<script src="url of aiWriteSupporter.min.js"></script>
<link rel="stylesheet" href="url of aiWriteSupporter.min.css">

UI

You can add the button that asks the AI to write content to the toolbar, balloon, quick insert, and menu areas. The button name is openAIInteraction.

Toolbar

// synapeditor.config.js
'editor.toolbar': [ /* ... */ 'openAIInteraction' ]

1.00

Quick Insert

// synapeditor.config.js
'editor.quickInsert': [ /* ... */ 'openAIInteraction' ]

1.00

Configuration Keys

KeyTypeRequiredDefaultDescription
urlstring✓''URL to call. Either OpenAI's API URL or your wrapper that proxies to OpenAI. The plugin button won't appear if this is empty.
apiKeystring
''OpenAI API key. Setting this in the browser exposes the key — prefer a server-side proxy.
aistring
'gpt'2.17.2311+ Which AI to use: 'gpt' (OpenAI GPT) or 'gemini' (Google, 3.0.2407+). NAVER HyperCLOVA X ('hcx') is discontinued.
requestBodyobject
{}Extra payload sent to the API. GPT4 model setting available from 3.0.2407+. Common keys: max_tokens, temperature, n, etc.
ocrUrlstring
''If set, enables the "Attach image" menu in draft creation — extracts text from images via OCR and sends with the prompt.
customPromptsobject[]
[]User-defined prompt menu entries. See Custom Prompts below.
categoryConfigobject
{}Per-category prompt menu list. See Category Config below.

URL & API Key

Sets the URL and API key of the API to send requests to.

For the URL, set the OpenAI API address (https://api.openai.com/v1/chat/completions) or a URL that forwards requests to the OpenAI API. The URL is required: if it is not set, the plugin's "AI Request" button does not appear in the toolbar, menus, and so on.

For the API key, set the key issued by OpenAI. Setting the API key on the client is not safe, because the key is exposed in the browser's developer tools > Network tab. To keep the key hidden, do not use this setting and send requests from your server instead.

// URL + API key (key visible in browser — unsafe)
'aiWriteSupporter.config': {
  url: 'https://api.openai.com/v1/chat/completions',
  apiKey: 'sk-abc123...456xyz'
}

// URL only (recommended — proxy through your server)
'aiWriteSupporter.config': {
  url: '/request'
}

Release 2.17.2311 and above.

Configure the following according to the generative AI you use.

OpenAI GPT

// URL + API key (key visible in browser, unsafe)
'aiWriteSupporter.config': {
  ai: 'gpt',
  url: 'https://api.openai.com/v1/chat/completions',
  apiKey: 'sk-abc123...456xyz'
}

// URL only
'aiWriteSupporter.config': {
  ai: 'gpt',
  url: '/request'
}

Note: NAVER HyperCLOVA X ('hcx') integration is discontinued (service ended). Switch to 'gpt' or 'gemini'.

Previous settings, for reference:

// url: a URL you implemented to forward requests to HyperCLOVA X
'aiWriteSupporter.config': {
  ai: 'hcx',
  url: '/request'
}

HyperCLOVA X options (Release 2.17.2311 and above):

FieldTypeDescription
temperaturedoubleGeneration diversity. 0–1 (default 0.5).
topKintTop-K sampling. 0–128 (default 0).
topPdoubleNucleus sampling. 0–1 (default 0.8).
repeatPenaltydoubleRepetition penalty. 0–10 (default 5).
stopBeforestringStop sequences (default []).
maxTokensintMax generation tokens. 0–2048 (default 2048).

Request Body

For GPT options see https://platform.openai.com/docs/api-reference/completions/create.

'aiWriteSupporter.config': {
  url: 'url',
  apiKey: 'apiKey',
  requestBody: {
    temperature: 2,
    presence_penalty: 2
    // ...
  }
}

Image Attachment

Available when the underlying AI is Gemini or GPT-4+ (3.0.2407+). Gemini supports up to 1 image; GPT-4+ supports up to 10.

OCR URL — "Attach Image"

When ocrUrl is set, the draft-creation menu shows an Attach Image option. The plugin OCRs the image and sends the extracted text together with the prompt.

1.00

'aiWriteSupporter.config': {
  ocrUrl: 'https://ailab.synap.co.kr/sdk',   // promotional usage
  ocrApiKey: 'issued-api-key'
}
ocrUrl not setocrUrl set
ocr-url-disabled.pngocr-url-enabled.png

Custom Prompts

Add prompt menu items:

'aiWriteSupporter.config': {
  customPrompts: [
    {
      key: 'my-custom-menu1',
      type: 'prompt',         // 'prompt' | 'immediately' | 'group'
      label: { ko: '나의 커스텀 메뉴 1', en: 'My custom menu 1' },
      prompt: { ko: '바나나를 영어로', en: 'banana in english' }
    },
    {
      key: 'my-custom-menu2',
      type: 'immediately',
      label: { ko: '나의 커스텀 메뉴 2', en: 'My custom menu 2' },
      prompt: { ko: '포도를 영어로', en: 'grape in english' }
    },
    {
      key: 'my-custom-menu3',
      type: 'group',
      label: { ko: '내가 제일 자주쓰는 메뉴 모음', en: 'My most used menu' },
      items: ['englishTranslation', 'tabularFormat']
    }
  ]
}

Item keys

Each entry is an object with key, type, label, and prompt keys:

{
    key: 'customPromptKey',
    type: 'prompt', // or 'immediately'
    label: {
        ko: '메뉴에 보여지는 텍스트',
        en: 'Label shown in menu'
    },
    prompt: {
        ko: 'AI에게 전달될 프롬프트. 요약해줘, 내용을 늘려줘, ...',
        en: 'Prompts to be passed to the AI',
    }
}

A menu with submenus uses type: 'group' and items:

{
    key: 'customPromptKey',
    type: 'group',
    label: {
        ko: '하위 메뉴가 있는 메뉴',
        en: 'Menu with submenus'
    },
    items: ['summarize', 'explanation', ...]
}
KeyTypeRequiredDescription
keystring✓Unique identifier for the prompt entry.
type'prompt' | 'immediately' | 'group'✓prompt — prompt text is pre-filled in the input. immediately — sent on click. group — has sub-menu items.
labelobject✓Per-language menu text.
promptobject
Per-language prompt text. Only for prompt / immediately.
itemsstring[]
Sub-item keys. Only for group.
iconNamestring
Optional icon name (must be registered with the editor).

Category Config

Categories: favorites, draft, edit, createByReference, write.

CategoryWhen shownDefault items
favoritesAlways[]
draft"AI Request" with no selection (caret only)emailGroup, meetingLogGroup, proposalGroup, reportGroup, marketingGroup, contractGroup, roadmapGroup, announcementGroup, guidelinesGroup, creativityGroup, draftEtcGroup
edit"AI Request" with selection, or after an AI responsepolishing, correctSpelling, writeShort, writeLong, toneChangeGroup, arrangingFormatGroup, characterCount
createByReference"AI Request" with selection, or after an AI responsesummarize, translationGroup, explanation, findActionItems, keywordRecommendation, makeTitle, addRelatedInfo
write"AI Request" with selection, or after an AI responsecontinueWriting

Overriding the draft category

You can redefine the menus shown in a category. The keys of the prompt menus predefined in the plugin are listed in Predefined Prompt Menu.

1.00

'aiWriteSupporter.config': {
  categoryConfig: {
    draft: ['meetingRequestEmail', 'salesEmail', 'jobAnnouncement']
  }
}

Hiding categories

Setting a category to an empty array hides that category.

1.00

// Hide edit and createByReference categories
'aiWriteSupporter.config': {
  categoryConfig: {
    edit: [],
    createByReference: []
  }
}

Adding custom menus to favorites

The favorites category is always shown in every situation. You can add the prompt menus you use most often.

1.00

'aiWriteSupporter.config': {
  categoryConfig: {
    favorites: ['my-custom-menu1', 'my-custom-menu2', 'my-custom-menu3']
  },
  customPrompts: [ /* ... see Custom Prompts above ... */ ]
}

In this section