Skip to content

Commit

Permalink
feat: set document (#3521)
Browse files Browse the repository at this point in the history
  • Loading branch information
Jocs authored Sep 21, 2024
1 parent d8b9271 commit 5489ce8
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion packages/docs-ui/src/services/editor/editor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -330,7 +330,12 @@ export class Editor extends Disposable implements IEditor {

this._commandService.executeCommand(ReplaceContentCommand.id, {
unitId: id,
body,
body: {
...body,
dataStream: body?.dataStream.endsWith('\r\n')
? body.dataStream.substring(0, body.dataStream.length - 2)
: body!.dataStream,
},
textRanges,
});
}
Expand Down

0 comments on commit 5489ce8

Please sign in to comment.