์์ํ๊ธฐ
์ด๋ค ํจํค์ง๋ฅผ ์ค์นํ ์ง
- ์ผ๋ฐ์ ์ธ ๋ฌธ์ ํธ์ง๊ธฐ:
@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-editorCommentPanel์ด๋ 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/editorCSS๋ advanced preset ์คํ์ผ์ ์ด๋ฏธ ํฌํจํฉ๋๋ค.justifyalignment๋ ์ง์ํ์ง ์์ต๋๋ค.- math๋ ๋ด์ฅํ์ง ์์ต๋๋ค. ํ์ํ๋ฉด Tiptap Mathematicsย ๋ฅผ ์ง์ ์กฐํฉํ์ธ์.
Last updated on