@junbyeol/tiptap-editor 0.1.1 → 0.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +1 -30
- package/dist/index.mjs +371 -393
- package/dist/types/tiptap/index.d.ts +10 -1
- package/package.json +1 -1
|
@@ -1,6 +1,15 @@
|
|
|
1
1
|
import { ComponentType } from 'react';
|
|
2
2
|
import { FileAttachmentAttributes } from './extensions/file-attachment';
|
|
3
3
|
export interface TiptapProps {
|
|
4
|
+
/**
|
|
5
|
+
* 에디터의 초기 HTML 콘텐츠.
|
|
6
|
+
* 마운트 시에만 적용되며, 이후 변경은 에디터 내부 상태로 관리됨.
|
|
7
|
+
*/
|
|
8
|
+
defaultValue?: string;
|
|
9
|
+
/**
|
|
10
|
+
* 에디터 콘텐츠가 변경될 때마다 호출되는 콜백. HTML 문자열을 반환.
|
|
11
|
+
*/
|
|
12
|
+
onChange?: (html: string) => void;
|
|
4
13
|
/**
|
|
5
14
|
* 제공 시: 파일을 CDN에 업로드하고 URL을 반환.
|
|
6
15
|
* 미제공 시: FileReader로 base64 변환 후 브라우저 메모리에 임시 저장.
|
|
@@ -25,5 +34,5 @@ export interface TiptapProps {
|
|
|
25
34
|
*/
|
|
26
35
|
FileAttachmentComponent?: ComponentType<FileAttachmentAttributes>;
|
|
27
36
|
}
|
|
28
|
-
declare const TiptapEditor: ({ uploadFile, onFileInsert, onFileError, allowNonImageFile, FileAttachmentComponent, }: TiptapProps) => import("react/jsx-runtime").JSX.Element;
|
|
37
|
+
declare const TiptapEditor: ({ defaultValue, onChange, uploadFile, onFileInsert, onFileError, allowNonImageFile, FileAttachmentComponent, }: TiptapProps) => import("react/jsx-runtime").JSX.Element;
|
|
29
38
|
export default TiptapEditor;
|