You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
|`completionApi`|`string`| The API route to use for the OpenAI completion API. |`/api/generate`|
60
-
|`className`|`string`| Additional classes to add to the editor container. |`""`|
61
-
|`defaultValue`|`JSONContent` or `string`| The default value to use for the editor. |[`defaultEditorContent`](https://github.com/steven-tey/novel/blob/main/packages/core/src/ui/editor/default-content.tsx)|
62
-
|`extensions`|`Extension[]`| A list of extensions to use for the editor, in addition to the [default Novel extensions](https://github.com/steven-tey/novel/blob/main/packages/core/src/ui/editor/extensions/index.tsx). |`[]`|
63
-
|`editorProps`|`EditorProps`| Props to pass to the underlying Tiptap editor, in addition to the [default Novel editor props](https://github.com/steven-tey/novel/blob/main/packages/core/src/ui/editor/props.ts). |`{}`|
64
-
|`onUpdate`|`(editor?: Editor) => void`| A callback function that is called whenever the editor is updated. |`() => {}`|
65
-
|`onDebouncedUpdate`|`(editor?: Editor) => void`| A callback function that is called whenever the editor is updated, but only after the defined debounce duration. |`() => {}`|
66
-
|`debounceDuration`|`number`| The duration (in milliseconds) to debounce the `onDebouncedUpdate` callback. |`750`|
67
-
|`storageKey`|`string`| The key to use for storing the editor's value in local storage. |`novel__content`|
|`completionApi`|`string`| The API route to use for the OpenAI completion API. |`/api/generate`|
60
+
|`className`|`string`| Additional classes to add to the editor container. |`"relative min-h-[500px] w-full max-w-screen-lg border-stone-200 bg-white p-12 px-8 sm:mb-[calc(20vh)] sm:rounded-lg sm:border sm:px-12 sm:shadow-lg"`|
61
+
|`defaultValue`|`JSONContent` or `string`| The default value to use for the editor. |[`defaultEditorContent`](https://github.com/steven-tey/novel/blob/main/packages/core/src/ui/editor/default-content.tsx)|
62
+
|`extensions`|`Extension[]`| A list of extensions to use for the editor, in addition to the [default Novel extensions](https://github.com/steven-tey/novel/blob/main/packages/core/src/ui/editor/extensions/index.tsx). |`[]`|
63
+
|`editorProps`|`EditorProps`| Props to pass to the underlying Tiptap editor, in addition to the [default Novel editor props](https://github.com/steven-tey/novel/blob/main/packages/core/src/ui/editor/props.ts). |`{}`|
64
+
|`onUpdate`|`(editor?: Editor) => void`| A callback function that is called whenever the editor is updated. |`() => {}`|
65
+
|`onDebouncedUpdate`|`(editor?: Editor) => void`| A callback function that is called whenever the editor is updated, but only after the defined debounce duration. |`() => {}`|
66
+
|`debounceDuration`|`number`| The duration (in milliseconds) to debounce the `onDebouncedUpdate` callback. |`750`|
67
+
|`storageKey`|`string`| The key to use for storing the editor's value in local storage. |`novel__content`|
68
68
69
69
> **Note**: Make sure to define an API endpoint that matches the `completionApi` prop (default is `/api/generate`). This is needed for the AI autocompletions to work. Here's an example: https://github.com/steven-tey/novel/blob/main/apps/web/app/api/generate/route.ts
|`completionApi`|`string`| The API route to use for the OpenAI completion API. |`/api/generate`|
60
-
|`className`|`string`| Additional classes to add to the editor container. |`""`|
61
-
|`defaultValue`|`JSONContent` or `string`| The default value to use for the editor. |[`defaultEditorContent`](https://github.com/steven-tey/novel/blob/main/packages/core/src/ui/editor/default-content.tsx)|
62
-
|`extensions`|`Extension[]`| A list of extensions to use for the editor, in addition to the [default Novel extensions](https://github.com/steven-tey/novel/blob/main/packages/core/src/ui/editor/extensions/index.tsx). |`[]`|
63
-
|`editorProps`|`EditorProps`| Props to pass to the underlying Tiptap editor, in addition to the [default Novel editor props](https://github.com/steven-tey/novel/blob/main/packages/core/src/ui/editor/props.ts). |`{}`|
64
-
|`onUpdate`|`(editor?: Editor) => void`| A callback function that is called whenever the editor is updated. |`() => {}`|
65
-
|`onDebouncedUpdate`|`(editor?: Editor) => void`| A callback function that is called whenever the editor is updated, but only after the defined debounce duration. |`() => {}`|
66
-
|`debounceDuration`|`number`| The duration (in milliseconds) to debounce the `onDebouncedUpdate` callback. |`750`|
67
-
|`storageKey`|`string`| The key to use for storing the editor's value in local storage. |`novel__content`|
|`completionApi`|`string`| The API route to use for the OpenAI completion API. |`/api/generate`|
60
+
|`className`|`string`| Additional classes to add to the editor container. |`"relative min-h-[500px] w-full max-w-screen-lg border-stone-200 bg-white p-12 px-8 sm:mb-[calc(20vh)] sm:rounded-lg sm:border sm:px-12 sm:shadow-lg"`|
61
+
|`defaultValue`|`JSONContent` or `string`| The default value to use for the editor. |[`defaultEditorContent`](https://github.com/steven-tey/novel/blob/main/packages/core/src/ui/editor/default-content.tsx)|
62
+
|`extensions`|`Extension[]`| A list of extensions to use for the editor, in addition to the [default Novel extensions](https://github.com/steven-tey/novel/blob/main/packages/core/src/ui/editor/extensions/index.tsx). |`[]`|
63
+
|`editorProps`|`EditorProps`| Props to pass to the underlying Tiptap editor, in addition to the [default Novel editor props](https://github.com/steven-tey/novel/blob/main/packages/core/src/ui/editor/props.ts). |`{}`|
64
+
|`onUpdate`|`(editor?: Editor) => void`| A callback function that is called whenever the editor is updated. |`() => {}`|
65
+
|`onDebouncedUpdate`|`(editor?: Editor) => void`| A callback function that is called whenever the editor is updated, but only after the defined debounce duration. |`() => {}`|
66
+
|`debounceDuration`|`number`| The duration (in milliseconds) to debounce the `onDebouncedUpdate` callback. |`750`|
67
+
|`storageKey`|`string`| The key to use for storing the editor's value in local storage. |`novel__content`|
68
68
69
69
> **Note**: Make sure to define an API endpoint that matches the `completionApi` prop (default is `/api/generate`). This is needed for the AI autocompletions to work. Here's an example: https://github.com/steven-tey/novel/blob/main/apps/web/app/api/generate/route.ts
0 commit comments