chore(react/type_widget): fix 4px scroll in SVG editor

This commit is contained in:
Elian Doran 2025-09-20 14:17:34 +03:00
parent 3dd757a857
commit 8e9f5fb486
No known key found for this signature in database
2 changed files with 6 additions and 0 deletions

View File

@ -21,6 +21,10 @@
contain: size !important;
}
.note-detail-split .note-detail-code-editor .cm-editor {
margin: 0 !important;
}
.note-detail-split .note-detail-error-container {
font-family: var(--monospace-font-family);
margin: 5px;

View File

@ -23,6 +23,7 @@ export default function SvgSplitEditor({ note, attachmentName, renderSvg, ...pro
const [ svg, setSvg ] = useState<string>();
const [ error, setError ] = useState<string | null | undefined>();
// Render the SVG.
async function onContentChanged(content: string) {
try {
const svg = await renderSvg(content);
@ -36,6 +37,7 @@ export default function SvgSplitEditor({ note, attachmentName, renderSvg, ...pro
}
}
// Save as attachment.
function onSave() {
const payload = {
role: "image",