mirror of
https://github.com/TriliumNext/Trilium.git
synced 2025-12-10 03:53:37 -06: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;
|
contain: size !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.note-detail-split .note-detail-code-editor .cm-editor {
|
||||||
|
margin: 0 !important;
|
||||||
|
}
|
||||||
|
|
||||||
.note-detail-split .note-detail-error-container {
|
.note-detail-split .note-detail-error-container {
|
||||||
font-family: var(--monospace-font-family);
|
font-family: var(--monospace-font-family);
|
||||||
margin: 5px;
|
margin: 5px;
|
||||||
|
|||||||
@ -23,6 +23,7 @@ export default function SvgSplitEditor({ note, attachmentName, renderSvg, ...pro
|
|||||||
const [ svg, setSvg ] = useState<string>();
|
const [ svg, setSvg ] = useState<string>();
|
||||||
const [ error, setError ] = useState<string | null | undefined>();
|
const [ error, setError ] = useState<string | null | undefined>();
|
||||||
|
|
||||||
|
// Render the SVG.
|
||||||
async function onContentChanged(content: string) {
|
async function onContentChanged(content: string) {
|
||||||
try {
|
try {
|
||||||
const svg = await renderSvg(content);
|
const svg = await renderSvg(content);
|
||||||
@ -36,6 +37,7 @@ export default function SvgSplitEditor({ note, attachmentName, renderSvg, ...pro
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Save as attachment.
|
||||||
function onSave() {
|
function onSave() {
|
||||||
const payload = {
|
const payload = {
|
||||||
role: "image",
|
role: "image",
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user