Layout > Hyphenation, off by default as in both word processors. The browser hyphenates in the document's own language (the body host gets lang and hyphens: auto) — measured, a justified German paragraph takes 15 lines instead of 17. ODF keeps fo:hyphenate in the base style's TEXT properties: probed, in paragraph-properties LibreOffice ignores it and drops it on the next save. Word takes w:autoHyphenation.
18 lines
602 B
TypeScript
18 lines
602 B
TypeScript
// Automatic hyphenation for the whole document: LibreOffice's Format ▸ Paragraph ▸
|
|
// Text Flow on the default paragraph style, Word's Layout ▸ Hyphenation. Off in both,
|
|
// so off here. ODF carries it as `fo:hyphenate` on that style, Word as
|
|
// `w:autoHyphenation` in settings.xml.
|
|
|
|
const KEY = 'edentext-hyphenation';
|
|
|
|
export const DEFAULT_HYPHENATION = false;
|
|
|
|
export function loadHyphenation(): boolean {
|
|
return localStorage.getItem(KEY) === 'true';
|
|
}
|
|
|
|
export function saveHyphenation(on: boolean): void {
|
|
if (on) localStorage.setItem(KEY, 'true');
|
|
else localStorage.removeItem(KEY);
|
|
}
|