| Filename | Latest commit message | Latest commit date |
|---|---|---|
|
All checks were successful
CI / check (push) Successful in 46m54s
ADR 0045, D12, step 1: project-halkyon was renamed halkyon-days, its repositories keeping their names. Every URL naming it moves along: the servers' source-code links, which the AGPL requires, and their tests; the forks in the pubspecs and the lock (appflowy-editor, pure-zstd, serverpod-offline-sync); the snaps, the F-Droid listings and the release configurations; the docs. The curator's credit for the alphabets names the repository by its name since ADR 0015, halkyon, rather than halkyon_learn. Forgejo redirects the old addresses until the name is taken again. ADRs 0015 and 0039 keep the name they were written with, and the local folders theirs. halkyon_editor's gen-l10n caches under build/, committed before its .gitignore named the folder, are no longer tracked. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Tizian 「ティツィアーン」 <raisondetredev@pm.me> |
||
| .. | ||
| lib | ||
| test | ||
| .gitignore | ||
| analysis_options.yaml | ||
| CHANGELOG.md | ||
| l10n.yaml | ||
| LICENSE | ||
| pubspec.yaml | ||
| README.md | ||
halkyon_editor
Halkyon's rich text, shared by its apps: the document as an app keeps it, the
one editor and the one read-only view of it, built on
appflowy_editor (our fork,
pinned, as every app's), with their texts in British English, American English
and German. Moved out of Halkyon Learn on 6 Nov 2026, when Halkyon Todo took
editor documents too (ADR 0033, D37).
Using it
An app installs HalkyonEditorLocalizations.delegate beside its other
delegates, and halkyon_ui's, whose sheets the Insert menu opens in.
// Stored: RichContent is the editor's document JSON and its format's version.
final content = RichContent.plain('Buy milk'); // or RichContent.empty()
content.plainText; // 'Buy milk'
content.isBlank; // false
final stored = content.toJson();
RichContent.fromJson(stored);
RichContentEditor(
initialContent: content,
onChanged: (content) => save(content),
formatBar: true,
);
RichContentView(content: content);
What it holds
RichContent(lib/src/content/): pure Dart, the document in JSON.content_blocks.dartnames every block's type and attributes across the apps, forplainTextand for what a block's type is called for good.RichContentEditor,RichContentView(lib/src/editor/): the editor, with theFormatBardocked below it while it has the focus, copying and pasting that keep the formats (EditorClipboard), links (editLink, Ctrl+K) and superscript and subscript; the view, display only, taking the height of its content.EditorBlocks: what an editor knows.basicBlocksis what it knows without an app (the editor's own builders; headings, lists, a checklist, a quote, a divider and a table to insert). An app adds its own blocks, and passes them asblocks:or throughEditorBlocksScope, with:builders,insertable(the Insert sheet and the desktop's/menu show the same list) andshortcuts;textMarks, how marks of its own are drawn, each wrapping the one before it, andformatActions, their buttons, after subscript;onEditorClosed, for what its text left outside the editor.plusjoins two sets,offeringnarrows what is offered and nothing else.
AtomicBlock,BlockNotice: for an app's block taken whole, selected and removed as one. A type nothing knows shows as needing a newer app, and stays as it is.
RichContentEditor's wrapEditor puts what an app adds around the editor
itself, knowing its state and focus (Learn's check of the spelling).
Editors are tested as in Learn: host one in a scrollable body with a slot of
fixed height, pump(const Duration(seconds: 1)) after changes, and find its
text with findRichText: true.
Licence
GNU Affero General Public License, version 3 or any later version
(AGPL-3.0-or-later), as the other packages of the apps; see LICENSE.