From 0c74fe94b1978f88c7cb167e7726f60b602c7e7b Mon Sep 17 00:00:00 2001 From: Steffen Becker Date: Thu, 13 Aug 2026 09:22:17 +0000 Subject: [PATCH] feat: footnotes and endnotes can be inserted and edited MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The anchor is an inline atom, the note text a block in the one noteSection at the document end; a sync plugin keeps notes in anchor order, renumbers them per class and drops the ones whose anchor is gone. Numbering, indent, size and separator defaults are LibreOffice's, read out of a document it saved. Endnotes still render in flow at the document end — lifting a footnote to the foot of its page is the next step. --- src/lib/components/ToolbarExpanded.svelte | 24 ++ src/lib/components/ribbon/icons.ts | 4 + .../ribbon/tabs/ReferencesTab.svelte | 19 + src/lib/editor/extensions.ts | 13 +- src/lib/editor/extensions/notes.ts | 390 ++++++++++++++++++ src/lib/editor/extensions/trailingNode.ts | 9 +- src/lib/editor/shortcuts.ts | 4 + src/lib/i18n/locales/de.ts | 7 + src/lib/i18n/locales/en.ts | 7 + src/lib/storage/noteSettings.ts | 135 ++++++ src/lib/storage/notes.svelte.ts | 15 + src/styles/editor.css | 49 +++ 12 files changed, 672 insertions(+), 4 deletions(-) create mode 100644 src/lib/editor/extensions/notes.ts create mode 100644 src/lib/storage/noteSettings.ts create mode 100644 src/lib/storage/notes.svelte.ts diff --git a/src/lib/components/ToolbarExpanded.svelte b/src/lib/components/ToolbarExpanded.svelte index 46e6be3..b67c962 100644 --- a/src/lib/components/ToolbarExpanded.svelte +++ b/src/lib/components/ToolbarExpanded.svelte @@ -1725,6 +1725,30 @@ + +