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.

ai-write-supporter-example.gif

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

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

UI

Toolbar

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

toolbar_ex.png

Quick Insert

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

quickinsert_ex.png

Configuration Keys

KeyTypeRequiredDefaultDescription
urlstring✓''URL to call. Either OpenAI's API URL, your wrapper that proxies to OpenAI, or your HyperCLOVA X wrapper. 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), 'hcx' (NAVER HyperCLOVA X), or 'gemini' (Google — 3.0.2407+).
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

// 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'
}

OpenAI GPT

'aiWriteSupporter.config': {
  ai: 'gpt',
  url: 'https://api.openai.com/v1/chat/completions',
  apiKey: 'sk-abc123...456xyz'
}
'aiWriteSupporter.config': {
  ai: 'hcx',
  url: '/request'
}

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
    // ...
  }
}

HyperCLOVA X options:

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).

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.

ocr-url-image-attach.gif

'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

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.
promptobjectPer-language prompt text. Only for prompt / immediately.
itemsstring[]Sub-item keys. Only for group.
iconNamestringOptional 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

redefine-draft-category-menu.png

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

Hiding categories

hide-category.png

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

Adding custom menus to favorites

add-custom-menu.png

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

In this section