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.

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
'editor.toolbar': [ /* ... */ 'openAIInteraction' ]

// quick insert
'editor.quickInsert': [ /* ... */ 'openAIInteraction' ]

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

NAVER HyperCLOVA X

'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. 01 (default 0.5).
topKintTop-K sampling. 0128 (default 0).
topPdoubleNucleus sampling. 01 (default 0.8).
repeatPenaltydoubleRepetition penalty. 010 (default 5).
stopBeforestringStop sequences (default []).
maxTokensintMax generation tokens. 02048 (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.

'aiWriteSupporter.config': {
  ocrUrl: 'https://ailab.synap.co.kr/sdk',   // promotional usage
  ocrApiKey: 'issued-api-key'
}

Custom Prompts

Add prompt menu items:

'aiWriteSupporter.config': {
  customPrompts: [
    {
      key: 'my-custom-menu1',
      type: 'prompt',         // 'prompt' | 'immediately' | 'group'
      label: { ko: '나의 커스텀 메뉴 1', en: 'My most used menu' },
      prompt: { ko: '바나나를 영어로', en: 'banana in english' }
    },
    {
      key: 'my-custom-menu2',
      type: 'immediately',
      label: { ko: '나의 커스텀 메뉴 2', en: 'My most used menu' },
      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
keystringUnique identifier for the prompt entry.
type'prompt' | 'immediately' | 'group'promptprompt text is pre-filled in the input. immediately — sent on click. group — has sub-menu items.
labelobjectPer-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

Examples:

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

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

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

Screenshots

OCR URL not configured

OCR URL configured

quickinsert_ex.png

The Ocean image.png

toolbar_ex.png

Overriding the draft category menu

Hiding categories

Adding custom menus

AI Write Supporter plugin example

Using the image attachment feature with OCR URL configured