Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .github/workflows/changelog.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,8 @@ jobs:

# Count lines this PR adds inside that section (ignoring blank lines and rules).
added=$(git diff -U0 "$base" "$HEAD_SHA" -- CHANGELOG.md | awk -v s="$start" -v e="$end" '
/^@@/ { split($3, a, ","); line = substr(a[1], 2); next }
BEGIN { s += 0; e += 0 }
/^@@/ { split($3, a, ","); line = substr(a[1], 2) + 0; next }
/^\+\+\+/ { next }
/^\+/ { if (line > s && line < e && $0 !~ /^\+[[:space:]]*(---)?[[:space:]]*$/) n++; line++; next }
END { print n + 0 }')
Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
- **`SelectionChanged` after undo, redo and loading**: `MintedEditorView.Undo()` and `Redo()` raise `SelectionChanged` when they move the caret, and `LoadHtml`/`LoadMarkdown` raise it after resetting the caret.
- **Undo for character formatting**: bold, italic, underline, strikethrough, subscript, superscript and clear formatting (toolbar, Ctrl+B/I/U and commands), the font family and size dropdowns, and the text and highlight colour pickers now record one undo step each. Undo restores the previous runs with their exact styles and redo reapplies the change. Toggling with a collapsed caret still only sets the pending style and is not recorded. `ApplyStyleAction` gains a constructor that wraps any formatting operation, and its undo no longer resets the paragraph style or restores the wrong paragraph when a table lies inside the range.
- **Removing a hyperlink**: `HyperlinkEngine.RemoveHyperlink` keeps the link text's formatting instead of turning it into one plain run, and `RemoveHyperlinkCommand` (toolbar and context menu) is now undoable through the new `RemoveHyperlinkAction`.
- **Editing in and around tables**: character formatting (toolbar, shortcuts, commands, `DocumentEditor.ApplyTextStyle` and the formatting engines) now applies to selected text in table cells, including selections spanning several cells (cells hidden by a merge are skipped, here and in copy and the toolbar state), and the toolbar toggles and undo work there; previously nothing changed but an undo step was recorded. Inserting a hyperlink in a table cell no longer throws, and is undoable. `DocumentEditor.GetSelectedText` (copy, cut) returns the text selected in table cells instead of an empty string, and now includes the text of hyperlinks (only the selected part of a partly selected link) and a newline for each line break, which it used to drop everywhere; so cutting linked text copies it, and linking already-linked text keeps that text in place. Undoing the deletion of a selection that runs across a table between two paragraphs (which deletes the table) now restores the table and both paragraphs, and undoing a deletion inside a cell restores the cell's text. `DocumentEditor.InsertText` at the start of an image now inserts the text before the image instead of after it, and redoing such an insertion (or one before a line break) right after a hyperlink keeps the text outside the link. See [Tables](docs/tables.md#editing-cell-content).
- **Undo restoring copies**: undoing a delete, paragraph merge, formatting change or link removal puts back the original runs, images, links and line breaks instead of copies, so undoing an earlier image or link insertion afterwards still removes it. Line breaks no longer come back as `"\n"` text, and images and line breaks inside links are no longer dropped.
- **Pending style follows the caret**: a format picked with nothing selected (e.g. Bold at a bare caret) now applies only at the caret where it was picked. Moving the caret (arrow keys, Home/End, a click, Backspace, or setting the selection from code) discards it, and the toolbar stops showing it; Enter still carries it into the new paragraph. New: `FormattingEngine`/`FontFormattingEngine.PendingStylePosition` and `DiscardPendingStyleIfMoved`. `TextRange.Empty` now holds positions outside any table cell (it used to be `default`, whose positions pointed at cell 0/0).
- **Plain-text paste formatting**: pasted text gets the same style as typed text at the caret (the pending style, else the caret's formatting) instead of `TextStyle.Default`, both in `EditorInputController.HandlePasteAsync` and `ClipboardOperations.PasteAsync` (caret formatting only).
Expand Down
6 changes: 6 additions & 0 deletions docs/tables.md
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,12 @@ When the caret is inside a table cell:

`Enter` does not split a paragraph inside a cell.

## Editing Cell Content

- **Character formatting** (bold, italic, font, colours, clear formatting, …) applies to the selected text in a cell. A selection that spans several cells formats every cell between its start and end cell in reading order (row by row), and a selection that covers a whole table formats all of its cells. Cells hidden by a merge are not part of a selection, so their text is neither formatted nor copied. Each change is one undo step.
- **Hyperlinks** can be inserted at the caret or over the selected text in a cell. A link stays within one cell: when the selection runs into another cell, only its part in the start cell is linked.
- **Deleting a selection** that starts in a paragraph before a table and ends in a paragraph after it deletes the table along with the selected text and joins the two paragraphs. Undo puts the table and the text back.

## HTML Export

Tables export as standard HTML; each cell's content is written as its paragraphs (line breaks added here for readability):
Expand Down
Loading
Loading