AI-native knowledge base & Evernote/Obsidian alternative with instant sync & native MCP. Free on Cloudflare or self-hosted via Docker.
HTML ai-agentcloudflarecloudflare-d1cloudflare-r2cloudflare-workersdockerelectronevernoteevernote-alternativeknowledge-basemcpnote-takingobsidian-alternativeoffline-firstpersonal-knowledge-basepwaself-hostedsqlitetiptapweb-clipper
fix(editor): style default-theme external hyperlinks
tianma-if676ae9c5301e
diff --git a/apps/ios/EditorSource/src/styles.css b/apps/ios/EditorSource/src/styles.cssindex 5773ebe1..58720e8f 100644--- a/apps/ios/EditorSource/src/styles.css+++ b/apps/ios/EditorSource/src/styles.css@@ -369,6 +369,42 @@ html[data-theme="dark"] .edgeever-image-size-button.is-active {font-size: 0.9em;}+/* External hyperlinks — match Web/Android default styling. */+.edgeever-prose a,+.ProseMirror a {+ color: #00751f;+ font-weight: 500;+ text-decoration: underline;+ text-decoration-color: rgba(0, 117, 31, 0.45);+ text-underline-offset: 2px;+ cursor: pointer;+}++.edgeever-prose a:active,+.ProseMirror a:active {+ color: #00a82d;+ text-decoration-color: #00a82d;+}++html[data-theme="dark"] .edgeever-prose a,+html[data-theme="dark"] .ProseMirror a {+ color: #86efac;+ text-decoration-color: rgba(134, 239, 172, 0.45);+}++html[data-theme="dark"] .edgeever-prose a:active,+html[data-theme="dark"] .ProseMirror a:active {+ color: #4ade80;+ text-decoration-color: #4ade80;+}++.edgeever-prose a.edgeever-attachment-link,+.ProseMirror a.edgeever-attachment-link,+.edgeever-prose a[href*="/api/v1/resources/"],+.ProseMirror a[href*="/api/v1/resources/"] {+ text-decoration: none;+}+.edgeever-prose blockquote,.ProseMirror blockquote {margin: 0.5em 0;diff --git a/apps/mobile/src/components/LocalTiptapEditor.tsx b/apps/mobile/src/components/LocalTiptapEditor.tsxindex bff378a1..3e2cd586 100644--- a/apps/mobile/src/components/LocalTiptapEditor.tsx+++ b/apps/mobile/src/components/LocalTiptapEditor.tsx@@ -1773,6 +1773,19 @@ const getEditorStyles = (theme: "light" | "dark", options?: { viewer?: boolean }.edgeever-editor-content pre { max-width: 100%; overflow-x: auto; border-radius: 10px; padding: 14px 90px 14px 14px; background: #0f172a; color: #e2e8f0; font-size: 0.9rem; }.edgeever-editor-content code { border-radius: 4px; padding: 2px 4px; background: ${theme === "dark" ? "#1e293b" : "#f1f5f9"}; font-size: 0.9em; }.edgeever-editor-content pre code { padding: 0; background: transparent; font-size: inherit; }+ /* External hyperlinks (match Web default ProseMirror). Attachment chips override below. */+ .edgeever-editor-content a {+ color: ${theme === "dark" ? "#86efac" : "#00751f"};+ font-weight: 500;+ text-decoration: underline;+ text-decoration-color: ${theme === "dark" ? "rgba(134, 239, 172, 0.45)" : "rgba(0, 117, 31, 0.45)"};+ text-underline-offset: 2px;+ cursor: pointer;+ }+ .edgeever-editor-content a:active {+ color: ${theme === "dark" ? "#4ade80" : "#00a82d"};+ text-decoration-color: ${theme === "dark" ? "#4ade80" : "#00a82d"};+ }/* Compact attachment chips: still ≥48px touch height, less vertical bulk than 58px. */.edgeever-editor-content a.edgeever-attachment-link, .edgeever-editor-content a[href*="/api/v1/resources/"] {display: flex;diff --git a/apps/web/src/styles/editor-typography.test.mjs b/apps/web/src/styles/editor-typography.test.mjsindex 9d0eae54..13b2256f 100644--- a/apps/web/src/styles/editor-typography.test.mjs+++ b/apps/web/src/styles/editor-typography.test.mjs@@ -23,6 +23,17 @@ describe("editor typography contract", () => {expect(MEMO_CONTENT_STYLE.body.paragraphSpacing).toBe(6);});+ test("styles default-theme external hyperlinks so they are distinct from body text", () => {+ const globals = readStyle("./globals.css");+ const linkRules = declarationsForSelector(globals, ".ProseMirror a");+ const markdownLinkRules = declarationsForSelector(globals, ".markdown-content a");++ expect(linkRules).toMatch(/color\s*:\s*var\(--brand-green-text\)/);+ expect(linkRules).toMatch(/text-decoration\s*:\s*underline/);+ expect(markdownLinkRules).toMatch(/color\s*:\s*var\(--brand-green-text\)/);+ expect(markdownLinkRules).toMatch(/text-decoration\s*:\s*underline/);+ });+test("does not let preset themes override body rhythm", () => {for (const filename of PRESET_THEME_FILES) {const source = readStyle(`./editor-themes/${filename}`);diff --git a/apps/web/src/styles/globals.css b/apps/web/src/styles/globals.cssindex 6ac606be..269293cc 100644--- a/apps/web/src/styles/globals.css+++ b/apps/web/src/styles/globals.css@@ -298,6 +298,31 @@ textarea {padding: 0;}+/* External hyperlinks (default theme).+ * Tailwind preflight resets <a> to inherit color/decoration, so without this+ * rule links are indistinguishable from body text. Note/attachment chips below+ * use more specific selectors and keep their chip appearance. */+.ProseMirror a {+ color: var(--brand-green-text);+ font-weight: 500;+ text-decoration: underline;+ text-decoration-color: color-mix(in srgb, var(--brand-green-text) 45%, transparent);+ text-underline-offset: 2px;+ cursor: pointer;+ transition: color 150ms ease, text-decoration-color 150ms ease;+}++.ProseMirror a:hover {+ color: var(--brand-green);+ text-decoration-color: var(--brand-green);+}++.ProseMirror a:focus-visible {+ outline: 2px solid var(--brand-green);+ outline-offset: 2px;+ border-radius: 2px;+}+.ProseMirror a.edgeever-note-link,.ProseMirror a[href^="#memo="] {display: inline-flex;diff --git a/apps/web/src/styles/mobile-markdown-editor.css b/apps/web/src/styles/mobile-markdown-editor.cssindex 569b67f4..c322f867 100644--- a/apps/web/src/styles/mobile-markdown-editor.css+++ b/apps/web/src/styles/mobile-markdown-editor.css@@ -404,6 +404,41 @@ input {white-space: pre-wrap;}+/* External hyperlinks — match desktop default ProseMirror link styling. */+.edgeever-mobile-tiptap-content a {+ color: #00751f;+ font-weight: 500;+ text-decoration: underline;+ text-decoration-color: rgb(0 117 31 / 0.45);+ text-underline-offset: 2px;+ cursor: pointer;+}++.edgeever-mobile-tiptap-content a:active,+.edgeever-mobile-tiptap-content a:hover {+ color: #00a82d;+ text-decoration-color: #00a82d;+}++.edgeever-mobile-tiptap-content a.edgeever-attachment-link,+.edgeever-mobile-tiptap-content a[href*="/api/v1/resources/"] {+ text-decoration: none;+}++:root.dark .edgeever-mobile-tiptap-content a,+html.dark .edgeever-mobile-tiptap-content a {+ color: #86efac;+ text-decoration-color: rgb(134 239 172 / 0.45);+}++:root.dark .edgeever-mobile-tiptap-content a:active,+:root.dark .edgeever-mobile-tiptap-content a:hover,+html.dark .edgeever-mobile-tiptap-content a:active,+html.dark .edgeever-mobile-tiptap-content a:hover {+ color: #4ade80;+ text-decoration-color: #4ade80;+}+.edgeever-mobile-tiptap-content p {margin: 0 0 6px;padding: 0;