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 and VicKun4937 committed Sep 23, 2024
1 parent ede1293 commit 1c560b3
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 1c560b3

Please sign in to comment.