Skip to Content
๋ ˆ์‹œํ”ผNext App Router

Next App Router Recipe

Next.js App Router์—์„œ Inkio๋ฅผ ๋ถ™์ผ ๋•Œ๋Š” examples/next-app-router๋ฅผ ๊ธฐ์ค€์œผ๋กœ ์‹œ์ž‘ํ•˜์„ธ์š”.

์ ํ•ฉํ•œ ๊ฒฝ์šฐ:

  • Next.js App Router
  • @inkio/extension๊นŒ์ง€ ๊ฐ™์ด ์“ฐ๋Š” ๊ฒฝ์šฐ
  • slash command, hashtag, wiki link, image upload ๊ฐ™์€ ํ™•์žฅ ๊ธฐ๋Šฅ์ด ํ•„์š”ํ•œ ๊ฒฝ์šฐ

์‹คํ–‰:

pnpm install pnpm --filter example-next-app-router dev

ํ•ต์‹ฌ ํฌ์ธํŠธ:

  • ์—๋””ํ„ฐ๋Š” use client ์ปดํฌ๋„ŒํŠธ ์•ˆ์—์„œ ๋ Œ๋”๋งํ•ฉ๋‹ˆ๋‹ค.
  • app/layout.tsx์—์„œ @inkio/editor/minimal.css, @inkio/extension/style.css๋ฅผ importํ•ฉ๋‹ˆ๋‹ค.
  • next.config.mjs์—์„œ @inkio/editor, @inkio/extension๋ฅผ transpilePackages์— ๋„ฃ์Šต๋‹ˆ๋‹ค.
  • getDefaultCoreExtensions()์— ํ•„์š”ํ•œ extension๋งŒ ์„œ๋ธŒํŒจ์Šค๋กœ ์กฐํ•ฉํ•˜๋Š” ๋ฐฉ์‹์„ ๊ธฐ์ค€์œผ๋กœ ์‚ฌ์šฉํ•ฉ๋‹ˆ๋‹ค.
  • full preset์ด ๋” ํŽธํ•˜๋ฉด getDefaultInkioExtensions()๋„ ์“ธ ์ˆ˜ ์žˆ์ง€๋งŒ, bundle ํฌ๊ธฐ๊ฐ€ ์ค‘์š”ํ•˜๋ฉด selective composition์ด ๋” ์•ˆ์ „ํ•ฉ๋‹ˆ๋‹ค.

์ฃผ์š” ํŒŒ์ผ:

  • examples/next-app-router/components/editor-demo.tsx
  • examples/next-app-router/app/layout.tsx
  • examples/next-app-router/next.config.mjs

AI์—๊ฒŒ ์š”์ฒญํ•  ๋•Œ๋Š” AI_CONTEXT.md์™€ ํ•จ๊ป˜ examples/next-app-router/components/editor-demo.tsx๋ฅผ ๊ธฐ์ค€์œผ๋กœ ์ˆ˜์ •ํ•˜๋ผ๊ณ  ์ฃผ๋Š” ๋ฐฉ์‹์ด ์ข‹์Šต๋‹ˆ๋‹ค.

Last updated on