Skip to Content
์‹œ์ž‘ํ•˜๊ธฐ

์‹œ์ž‘ํ•˜๊ธฐ

์–ด๋–ค ํŒจํ‚ค์ง€๋ฅผ ์„ค์น˜ํ• ์ง€

  • ์ผ๋ฐ˜์ ์ธ ๋ฌธ์„œ ํŽธ์ง‘๊ธฐ: @inkio/simple
  • notion-like ์—๋””ํ„ฐ: @inkio/editor
  • comments, mention, wiki link ๊ฐ™์€ ๊ณ ๊ธ‰ ๊ธฐ๋Šฅ: @inkio/advanced
  • ์ด๋ฏธ์ง€ ํŽธ์ง‘: @inkio/image-editor

์„ค์น˜

npm install @inkio/simple react react-dom

๋˜๋Š”:

npm install @inkio/editor react react-dom

์˜ต์…˜:

npm install @inkio/image-editor

CommentPanel์ด๋‚˜ comment i18n์ฒ˜๋Ÿผ advanced export๋ฅผ ์ง์ ‘ importํ•  ๋•Œ๋งŒ @inkio/advanced๋ฅผ ์ถ”๊ฐ€ ์„ค์น˜ํ•ฉ๋‹ˆ๋‹ค.

Inkio๋Š” ์ž์‹ ์ด ์‚ฌ์šฉํ•˜๋Š” Tiptap runtime์„ ์ง์ ‘ ์†Œ์œ ํ•ฉ๋‹ˆ๋‹ค. ์ผ๋ฐ˜ ์‚ฌ์šฉ์ž๋Š” React peer๋งŒ ๋งž์ถ”๋ฉด ๋ฉ๋‹ˆ๋‹ค.

์Šคํƒ€์ผ

Simple:

import '@inkio/simple/minimal.css';

Editor:

import '@inkio/editor/minimal.css';

Image editor:

import '@inkio/image-editor/style.css';

๊ธฐ๋ณธ ์‚ฌ์šฉ

Simple:

import { Editor } from '@inkio/simple'; export function Page() { return <Editor initialContent="<p>Hello Inkio</p>" />; }

Editor:

import { Editor } from '@inkio/editor'; export function Page() { return ( <Editor initialContent="<p>Hello Inkio</p>" hashtagItems={({ query }) => [ { id: query || 'inkio', label: `#${query || 'inkio'}` }, ]} ui={{ showBubbleMenu: true, showFloatingMenu: true }} /> ); }

๊ธฐ์–ตํ•  ๊ทœ์น™

  • content์™€ initialContent๋Š” ๋™์‹œ์— ๋„˜๊ธฐ์ง€ ์•Š์Šต๋‹ˆ๋‹ค.
  • @inkio/editor๋Š” notion-like surface ๊ธฐ๋ณธ๊ฐ’์„ ๊ฐ€์ง‘๋‹ˆ๋‹ค.
  • @inkio/simple์€ classic toolbar surface ๊ธฐ๋ณธ๊ฐ’์„ ๊ฐ€์ง‘๋‹ˆ๋‹ค.
  • shell / panel / field ๊ฐ™์€ chrome surface๋Š” ํŒจํ‚ค์ง€ ๊ฐ„์— ๊ณตํ†ต Inkio token์„ ๊ณต์œ ํ•ฉ๋‹ˆ๋‹ค.
  • @inkio/image-editor๋Š” fullscreen overlay ๊ตฌ์กฐ์ง€๋งŒ ๊ฐ™์€ surface ๊ณ„์ธต์„ ์”๋‹ˆ๋‹ค.
  • @inkio/editor CSS๋Š” advanced preset ์Šคํƒ€์ผ์„ ์ด๋ฏธ ํฌํ•จํ•ฉ๋‹ˆ๋‹ค.
  • justify alignment๋Š” ์ง€์›ํ•˜์ง€ ์•Š์Šต๋‹ˆ๋‹ค.
  • math๋Š” ๋‚ด์žฅํ•˜์ง€ ์•Š์Šต๋‹ˆ๋‹ค. ํ•„์š”ํ•˜๋ฉด Tiptap Mathematicsย ๋ฅผ ์ง์ ‘ ์กฐํ•ฉํ•˜์„ธ์š”.
Last updated on