Add workspace links, restore tabs, and update project guides
This commit is contained in:
@@ -8,6 +8,7 @@
|
||||
import { defaultKeymap, indentWithTab, isolateHistory } from "@codemirror/commands";
|
||||
import { writerHistory, historyKeymap } from "./writerHistory";
|
||||
import { markdown, markdownLanguage } from "@codemirror/lang-markdown";
|
||||
import { foldedRanges, unfoldEffect } from "@codemirror/language";
|
||||
import { noteFormats } from "./noteFormats";
|
||||
import { closeSearchPanel, findNext, findPrevious, openSearchPanel, searchKeymap } from "@codemirror/search";
|
||||
import { htmlToMarkdown } from "$lib/workspace/htmlToMarkdown";
|
||||
@@ -409,7 +410,9 @@
|
||||
if (!view || line == null) return;
|
||||
untrack(() => {
|
||||
const anchor = view.state.doc.line(Math.min(view.state.doc.lines, Math.max(1, line))).from;
|
||||
view.dispatch({ selection: { anchor }, effects: EditorView.scrollIntoView(anchor, { y: "center" }) });
|
||||
const effects = [EditorView.scrollIntoView(anchor, { y: "center" })];
|
||||
foldedRanges(view.state).between(anchor, anchor, (from, to) => { effects.push(unfoldEffect.of({ from, to })); });
|
||||
view.dispatch({ selection: { anchor }, effects });
|
||||
view.focus();
|
||||
});
|
||||
});
|
||||
@@ -461,7 +464,7 @@
|
||||
.live-writer :global(.writer-checkbox) { display: inline-block; position: static; width: 15px; height: 15px; margin: 0 .55em 0 0; vertical-align: -.1em; accent-color: var(--rs-accent); cursor: pointer; }
|
||||
/* Keep child margins inside the measured widget; collapsed margins otherwise
|
||||
shift mouse hit-testing to the next line after a table or other preview. */
|
||||
.live-writer :global(.writer-preview) { display: flow-root; max-width: none; margin: 0; }
|
||||
.live-writer :global(.writer-preview) { display: flow-root; max-width: none; margin: 0; white-space: normal; }
|
||||
.live-writer :global(.writer-preview > :last-child) { margin-bottom: 0; }
|
||||
.live-writer :global(.writer-preview img) { max-width: 100%; }
|
||||
.live-writer :global(.writer-table) { position: relative; width: fit-content; max-width: 100%; margin: 1.4em 0 0; padding: 26px; }
|
||||
|
||||
Reference in New Issue
Block a user