diff --git a/shared/editor/components/Styles.ts b/shared/editor/components/Styles.ts index 9a1537f72d..68632f00d6 100644 --- a/shared/editor/components/Styles.ts +++ b/shared/editor/components/Styles.ts @@ -523,6 +523,21 @@ const textStyle = () => css` margin-bottom: 0.8em; } } + + /* East Asian scripts */ + :lang(zh), /* Chinese */ + :lang(ja), /* Japanese */ + :lang(ko) { + /* Korean */ + p { + line-height: 1.8; + } + + .ProseMirror > p { + margin-top: 0.8em; + margin-bottom: 0.8em; + } + } `; const style = (props: Props) => css` diff --git a/shared/utils/language.test.ts b/shared/utils/language.test.ts index c3336a9ea0..795ee87e86 100644 --- a/shared/utils/language.test.ts +++ b/shared/utils/language.test.ts @@ -37,6 +37,7 @@ describe("getSupportedLanguage", () => { describe("getLangFor", () => { it("returns languages that need special text styling", () => { expect(getLangFor("fa")).toEqual("fa"); + expect(getLangFor("zh")).toEqual("zh"); }); it("ignores other or empty languages", () => { diff --git a/shared/utils/language.ts b/shared/utils/language.ts index 82d14c93ad..1643b7f646 100644 --- a/shared/utils/language.ts +++ b/shared/utils/language.ts @@ -91,6 +91,9 @@ const scriptsWithLang = new Set([ "he", // Hebrew "am", // Amharic "mn", // Mongolian + "zh", // Chinese + "ja", // Japanese + "ko", // Korean ]); /**