Skip to content

Commit

Permalink
refactor: fix for when not new line
Browse files Browse the repository at this point in the history
  • Loading branch information
phodal committed Sep 23, 2024
1 parent e3c6356 commit 13a132c
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions web/core/lib/editor/action/AiActionExecutor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,11 @@ export class AiActionExecutor {
})
);

if (buffer.length > 0) {
const pos = actionPosition(action, this.editor.state.selection);
this.editor.chain().focus()?.insertContentAt(pos, buffer).run();
}

if (this.editor == null) {
console.error('editor is not, can not insert content');
return;
Expand Down

0 comments on commit 13a132c

Please sign in to comment.