A fully open source & end-to-end encrypted note taking alternative to Evernote.
TypeScript asp-net-coredotnet-coreelectronfosshacktoberfestnote-managmentnote-takingnote-taking-appnotebooknotesnotes-appopen-sourceopensourceprivacyproductivityreactreact-nativereactjsself-hosted
web: treat setting item descriptions as md and convert them to html (#7343)
01zulfia177d36571ca
diff --git a/apps/web/src/dialogs/settings/index.tsx b/apps/web/src/dialogs/settings/index.tsxindex 4d04d8c94..22a334585 100644--- a/apps/web/src/dialogs/settings/index.tsx+++ b/apps/web/src/dialogs/settings/index.tsx@@ -77,6 +77,7 @@ import { AppLockSettings } from "./app-lock-settings";import { BaseDialogProps, DialogManager } from "../../common/dialog-manager";import { ServersSettings } from "./servers-settings";import { strings } from "@notesnook/intl";+import { mdToHtml } from "../../utils/md";type SettingsDialogProps = BaseDialogProps<false> & {activeSection?: SectionKeys;@@ -470,13 +471,17 @@ function SettingItem(props: { item: Setting }) {<Text variant={"subtitle"}>{item.title}</Text>{item.description && (<Text+ as={"div"}variant={"body"}sx={{ mt: 1, color: "paragraph", whiteSpace: "pre-wrap" }}- >- {typeof item.description === "function"- ? item.description(state)- : item.description}- </Text>+ dangerouslySetInnerHTML={{+ __html: mdToHtml(+ typeof item.description === "function"+ ? item.description(state)+ : item.description+ )+ }}+ />)}</Flex>