mirror of
https://github.com/zadam/trilium.git
synced 2025-11-11 08:58:58 +01:00
chore(react/type_widget): fix 4px scroll in SVG editor
This commit is contained in:
parent
3dd757a857
commit
8e9f5fb486
@ -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;
|
||||
|
||||
@ -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",
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user