mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-11 20:08:37 +00:00
fix(editor): sentry-17da76f65b91465b911fad44279d971a (#9315)
This commit is contained in:
@@ -203,6 +203,8 @@ export function getTextWidth(text: string, font: string): number {
|
||||
}
|
||||
|
||||
export function wrapTextDeltas(text: Y.Text, font: string, w: number) {
|
||||
if (!text) return [];
|
||||
|
||||
const deltas: TextDelta[] = (text.toDelta() as TextDelta[]).flatMap(
|
||||
delta => ({
|
||||
insert: wrapText(delta.insert, font, w),
|
||||
|
||||
Reference in New Issue
Block a user