Skip to content

Commit 33a3fa7

Browse files
committed
add rich editor to devdemo
1 parent efc48a1 commit 33a3fa7

File tree

1 file changed

+22
-22
lines changed

1 file changed

+22
-22
lines changed

dev-demo/resources/apartments.ts

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -321,29 +321,29 @@ export default {
321321
// debounceTime: 250,
322322
// }
323323
// }),
324-
// new RichEditorPlugin({
325-
// htmlFieldName: "description",
326-
// completion: {
327-
// adapter: new CompletionAdapterOpenAIChatGPT({
328-
// openAiApiKey: process.env.OPENAI_API_KEY as string,
329-
// }),
330-
// expert: {
331-
// debounceTime: 250,
332-
// },
333-
// },
334-
// // requires to have table 'description_images' with upload plugin installed on attachment field
324+
new RichEditorPlugin({
325+
htmlFieldName: "description",
326+
completion: {
327+
adapter: new CompletionAdapterOpenAIChatGPT({
328+
openAiApiKey: process.env.OPENAI_API_KEY as string,
329+
}),
330+
expert: {
331+
debounceTime: 250,
332+
},
333+
},
334+
// requires to have table 'description_images' with upload plugin installed on attachment field
335335

336-
// ...(process.env.AWS_ACCESS_KEY_ID
337-
// ? {
338-
// attachments: {
339-
// attachmentResource: "description_images",
340-
// attachmentFieldName: "image_path",
341-
// attachmentRecordIdFieldName: "record_id",
342-
// attachmentResourceIdFieldName: "resource_id",
343-
// },
344-
// }
345-
// : {}),
346-
// }),
336+
...(process.env.AWS_ACCESS_KEY_ID
337+
? {
338+
attachments: {
339+
attachmentResource: "description_images",
340+
attachmentFieldName: "image_path",
341+
attachmentRecordIdFieldName: "record_id",
342+
attachmentResourceIdFieldName: "resource_id",
343+
},
344+
}
345+
: {}),
346+
}),
347347
],
348348

349349
options: {

0 commit comments

Comments
 (0)