Skip to content

A fully open source & end-to-end encrypted note taking alternative to Evernote.

feat: change System font to Default

thecodrr893b8854dc65
diff --git a/packages/editor/dist/es/toolbar/tools/font.js b/packages/editor/dist/es/toolbar/tools/font.js
index 68a0b96ab..cdbd6f805 100644
--- a/packages/editor/dist/es/toolbar/tools/font.js
+++ b/packages/editor/dist/es/toolbar/tools/font.js
@@ -23,7 +23,7 @@ export function FontSize(props) {
}, onReset: () => { var _a; return (_a = editor.current) === null || _a === void 0 ? void 0 : _a.chain().focus().setFontSize(`16px`).run(); }, value: fontSize }));
}
const fontFamilies = {
- System: "Open Sans",
+ Default: "Open Sans",
Serif: "serif",
Monospace: "monospace",
};
@@ -31,7 +31,7 @@ export function FontFamily(props) {
var _a, _b;
const { editor } = props;
const currentFontFamily = ((_b = (_a = Object.entries(fontFamilies)
- .find(([key, value]) => editor.isActive("textStyle", { fontFamily: value }))) === null || _a === void 0 ? void 0 : _a.map((a) => a)) === null || _b === void 0 ? void 0 : _b.at(0)) || "System";
+ .find(([key, value]) => editor.isActive("textStyle", { fontFamily: value }))) === null || _a === void 0 ? void 0 : _a.map((a) => a)) === null || _b === void 0 ? void 0 : _b.at(0)) || "Default";
const items = useMemo(() => toMenuItems(editor, currentFontFamily), [currentFontFamily]);
return (_jsx(Dropdown, { selectedItem: currentFontFamily, items: items, menuWidth: 130 }));
}
diff --git a/packages/editor/src/toolbar/tools/font.tsx b/packages/editor/src/toolbar/tools/font.tsx
index a4b9e00dd..ef93ba1c5 100644
--- a/packages/editor/src/toolbar/tools/font.tsx
+++ b/packages/editor/src/toolbar/tools/font.tsx
@@ -44,7 +44,7 @@ export function FontSize(props: ToolProps) {
}
const fontFamilies = {
- System: "Open Sans",
+ Default: "Open Sans",
Serif: "serif",
Monospace: "monospace",
};
@@ -57,7 +57,7 @@ export function FontFamily(props: ToolProps) {
editor.isActive("textStyle", { fontFamily: value })
)
?.map((a) => a)
- ?.at(0) || "System";
+ ?.at(0) || "Default";
const items = useMemo(
() => toMenuItems(editor, currentFontFamily),
[currentFontFamily]