설치 가이드

다양한 환경에서 @dev-jitsu/web-editor를 설치하는 방법을 안내합니다.

npm / yarn / pnpm

npm
npm install @dev-jitsu/web-editor
yarn
yarn add @dev-jitsu/web-editor
pnpm
pnpm add @dev-jitsu/web-editor

CDN 사용

빌드 시스템 없이 HTML에서 직접 사용할 수 있습니다.

<!-- CSS -->
<link rel="stylesheet" href="https://cdn.dev-jitsu.com/web-editor/latest/styles.css">

<!-- JavaScript -->
<script src="https://cdn.dev-jitsu.com/web-editor/latest/umd.min.js"></script>

<!-- 사용 -->
<script>
  const editor = DevJitsu.WebEditor.create('#editor', {
    licenseKey: 'YOUR_LICENSE_KEY'
  });
</script>

폐쇄망 / 오프라인 설치

인터넷이 연결되지 않은 환경에서는 프라이빗 레지스트리를 통해 설치할 수 있습니다.

엔터프라이즈 플랜에서만 폐쇄망 설치를 지원합니다. 자세한 내용은 영업팀에 문의해 주세요.

Verdaccio 프라이빗 레지스트리

# .npmrc 설정
@dev-jitsu:registry=http://your-private-registry:4873/

# 설치
npm install @dev-jitsu/web-editor

TypeScript 지원

패키지에 TypeScript 타입 정의가 포함되어 있어 별도 설치가 필요 없습니다.

import { WebEditor, WebEditorProps } from '@dev-jitsu/web-editor';

const config: WebEditorProps = {
  licenseKey: 'YOUR_KEY',
  theme: 'dark',
  height: 600,
};

번들러 설정

Vite

// vite.config.ts
export default defineConfig({
  optimizeDeps: {
    include: ['@dev-jitsu/web-editor'],
  },
});

Next.js

// next.config.js
module.exports = {
  transpilePackages: ['@dev-jitsu/web-editor'],
};