docs(design): plan the inline formatting step - #893
Merged
Merged
Conversation
The editing plans named inline formatting as the one open step and held one
sketch for it, `setMark {ids, mark, on}`, over four properties. The sketch
does not carry colour or size, because they are values and not toggles.
The document editing plan now has the section for it: seven properties and
where each format keeps them, the op `setTextStyle {id, style}`, decisions
8 to 16, the adapter surface, four steps of work and the open questions.
Two facts from the code shape it. A run shares its style container with its
siblings in all three writing engines, so a mark first gives the run a
container of its own. The renderer writes two `text-decoration`
declarations for a run that is both underlined and struck through, and the
second wins.
Formatting sits behind the editing scope: `paragraph` refuses it, and only
`document` takes it. The highlight question in editing.md is answered.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0137vd79NGaB8nfLsdPoghM4
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.
🤖 Generated with Claude Code
The editing plans named inline formatting as the one open step and held one sketch for it,
setMark {ids, mark, on}, over four properties. The sketch does not carry colour or size, because they are values and not toggles.docs/design/document-editing.mdgets the section for it:setTextStyle {id, style}, carrying values rather than toggles, one run per op;text:span/w:r/a:r), ODF reaches a mark through a fresh automatic style,w:rPrkeeps its schema order, highlight is the character background with the docxw:highlight/w:shdsplit, the editor writes the renderer's css, and the two ways a gesture reaches the editor;The gate. Formatting sits behind
HtmlConfig::editing_scope: underparagraphevery formatting gesture refuses withoutOfScope, and onlydocumenttakes it.editing.mdstates it in the scope table.Two findings from the code shape the plan: in all three writing engines the addressed run shares its container's style with its siblings, which
text_insertrelies on; andtranslate_text_stylewrites twotext-decorationdeclarations for a run that is both underlined and struck through, so the second wins. No reference page hits that case.editing.mdand the roadmap indocs/design/README.mdfollow. Docs only, no changelog entry.The code lands in stacked PRs on top of this one: the renderer fix, the op with the ODF write side, docx and pptx, the browser editor, the bindings.
https://claude.ai/code/session_0137vd79NGaB8nfLsdPoghM4