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

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

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

  • ๋Œ“๊ธ€ยท๋ฉ˜์…˜ยท์Šฌ๋ž˜์‹œ ๋ฉ”๋‰ด๊ฐ€ ํ•„์š”ํ•˜๋ฉด โ†’ @inkio/editor
  • ํˆด๋ฐ” ์œ„์ฃผ classic ํŽธ์ง‘๊ธฐ๋กœ ์ถฉ๋ถ„ํ•˜๋ฉด โ†’ @inkio/simple
  • ์‹ค์‹œ๊ฐ„ ํ˜‘์—…์ด ํ•„์š”ํ•˜๋ฉด โ†’ ์œ„ ์„ ํƒ + @inkio/collab
  • ์ด๋ฏธ์ง€ ์ž๋ฅด๊ธฐยท๋ชจ์ž์ดํฌ๊ฐ€ ํ•„์š”ํ•˜๋ฉด โ†’ ์œ„ ์„ ํƒ + @inkio/image-editor
  • ์ง์ ‘ ์กฐํ•ฉ(์Šคํ‚ค๋งˆยทํ™•์žฅ ๋‹จ์œ„ ์ œ์–ด)์ด ํ•„์š”ํ•˜๋ฉด โ†’ @inkio/core (+ @inkio/advanced)

@inkio/advanced๋Š” ๋‹จ๋… ์„ค์น˜ํ•˜์ง€ ๋งˆ์„ธ์š”. editor์— ํฌํ•จ๋˜์–ด ์žˆ๊ณ , ์ง์ ‘ importํ•˜๋Š” export๋ฅผ ์“ธ ๋•Œ๋งŒ ์ถ”๊ฐ€ํ•ฉ๋‹ˆ๋‹ค.

์„ค์น˜

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 content="<p>Hello Inkio</p>" />; }

Editor:

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

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

  • content๋Š” ์ดˆ๊ธฐ ๋ฌธ์„œ์ž…๋‹ˆ๋‹ค. ๋งˆ์šดํŠธ ํ›„ ์ƒํƒœ๋Š” ์—๋””ํ„ฐ๊ฐ€ ์†Œ์œ ํ•˜๋ฉฐ, ์™ธ๋ถ€์—์„œ ๊ฐ’์„ ๋ฐ”๊พธ๋ ค๋ฉด onCreate ์ธ์Šคํ„ด์Šค์˜ editor.commands.setContent()๋ฅผ ์“ฐ์„ธ์š”.
  • @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