@@ -27,11 +27,11 @@ import { useStore as useSettingStore } from "../../stores/setting-store";
2727import { getFonts } from "@notesnook/editor" ;
2828import { useSpellChecker } from "../../hooks/use-spell-checker" ;
2929import { SpellCheckerLanguages } from "./components/spell-checker-languages" ;
30-
3130import { CustomizeToolbar } from "./components/customize-toolbar" ;
3231import { DictionaryWords } from "./components/dictionary-words" ;
3332import { strings } from "@notesnook/intl" ;
3433import { isMac } from "../../utils/platform" ;
34+ import { EDITOR_LINE_HEIGHT } from "../../components/editor/common" ;
3535
3636export const EditorSettings : SettingsGroup [ ] = [
3737 {
@@ -94,6 +94,24 @@ export const EditorSettings: SettingsGroup[] = [
9494 }
9595 ]
9696 } ,
97+ {
98+ key : "line-height" ,
99+ title : strings . lineHeight ( ) ,
100+ description : strings . lineHeightDesc ( ) ,
101+ onStateChange : ( listener ) =>
102+ onEditorConfigChange ( ( c ) => c . lineHeight , listener ) ,
103+ components : [
104+ {
105+ type : "input" ,
106+ inputType : "number" ,
107+ max : EDITOR_LINE_HEIGHT . MAX ,
108+ min : EDITOR_LINE_HEIGHT . MIN ,
109+ defaultValue : ( ) => editorConfig ( ) . lineHeight ,
110+ onChange : ( value ) =>
111+ useEditorManager . getState ( ) . setEditorConfig ( { lineHeight : value } )
112+ }
113+ ]
114+ } ,
97115 {
98116 key : "double-spacing" ,
99117 title : strings . doubleSpacedLines ( ) ,
0 commit comments