Bold, italic, underline and strikethrough on the page - #23
Merged
Merged
Conversation
added 3 commits
September 27, 2026 18:20
…trike edit::format cuts the range's ends into the nodes they fall inside, restyles a span the range holds whole and wraps any other run in a new span inside whatever holds it, so no span or link the document had is taken apart. A property is written only where it changes what is drawn, a span left saying nothing gives way to its contents, and taking a mark off text it was put on gives back the paragraph it was. edit::marked answers whether a range, or the text typed at a caret, carries a mark. A span's style is an automatic style in content.xml, reused where one says the same and otherwise named T and the first free number. Styles::add registers it and never forgets a name, so an undo cannot free one for a different style. Element::name_for and Element::declares move down from Document so the format can spell what it writes the document's way, and a document that does not declare the namespace is refused with Refused::Namespace. tests/format.rs formats a range of every corpus paragraph, holds everything outside it equal, and checks that on then off gives the paragraph back.
egui_richedit gains Mark, Edit::Format and Model::marked, which defaults to nothing marked for a model that keeps no formatting. RichEdit::toggle gives the selection a mark, or takes it off where all of it has it, as one undo step and keeping the selection. With a caret and nothing selected the mark waits for what is typed next at that caret, and goes with the typing's step. FlowModel takes the document's Styles and formats paragraph by paragraph, moving its root along when the library writes an automatic-styles container before the body. odox_ui::toolbar draws the four buttons over the page in xodt and xodp in edit mode, lit where the whole selection has the mark. German says Fett, Kursiv, Unterstrichen and Durchgestrichen.
…ruck DESIGN.md §11 states what a person can do and what a mark does to the tree. The README, the manual page, the Debian description, both store listings and the release notes for Odox Text and Odox Deck say so; Odox Grid's copy is unchanged, since a cell is not formatted. The App Review note in the listing says how to try it.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Text in a document or a slide's label can be made bold, italic, underlined or struck through: Ctrl+B, Ctrl+I and Ctrl+U, or the row of buttons over the page in edit mode. A selection takes the mark, or loses it where all of it has it, as one undo step. With only a caret, the mark goes to what is typed next there, in the same step as the typing. A spreadsheet cell is not formatted.
The library does the tree work in
edit::format. It restyles a span the range holds whole and wraps any other run in a new span, so no span or link the document had is taken apart. It writes a property only where that changes what is drawn, and minting reuses automatic styles that say the same thing.tests/format.rsformats a range of every corpus paragraph, holds everything outside it equal, and checks that on then off gives the paragraph back.Docs and listings now say this: DESIGN.md §11, the README, the manual page, the Debian description, both store listings and the release notes for Odox Text and Odox Deck. The App Review note in
store-listing.tomlchanged and has to be retyped into App Store Connect at submission.Verified on X11 in xodt and xodp, including a save reopened by the save guard. Workspace tests and clippy with
-D warningspass.