Skip to content

feat(ios): put styled HTML on the clipboard when copying - #656

Merged
maksg merged 1 commit into
mainfrom
ios-parity/09-copy-html
Aug 13, 2026
Merged

feat(ios): put styled HTML on the clipboard when copying#656
maksg merged 1 commit into
mainfrom
ios-parity/09-copy-html

Conversation

@maksg

@maksg maksg commented Aug 12, 2026

Copy link
Copy Markdown
Collaborator

System Copy now writes a public.html flavor alongside plain text, so pasting into rich-text targets keeps headings, inline styles, lists, blockquotes, code blocks, links, and images. The HTML is generated by walking the custom rendering attributes and emitting semantic tags with inline CSS derived from the style config.

The system attributed-string HTML exporter was deliberately not used: it drops image URLs, loses list markers and block chrome (drawn by decoration views, absent from the text), and emits unstable CSS.

The pasteboard is injectable on MarkdownTextView because headless test processes are not authorized to access UIPasteboard.general.

What/Why?

Testing

PR Checklist

  • Code compiles and runs on iOS
  • Code compiles and runs on Android
  • Updated documentation/README if applicable
  • Ran example app to verify changes
  • E2E tests are passing
  • Required E2E tests have been added (if applicable)

@maksg
maksg force-pushed the ios-parity/09-copy-html branch from 849a165 to f268da2 Compare August 13, 2026 10:18
@maksg
maksg force-pushed the ios-parity/06-voiceover branch from 2fa2ef1 to fe5adb1 Compare August 13, 2026 11:07
Base automatically changed from ios-parity/06-voiceover to main August 13, 2026 11:10
System Copy now writes a public.html flavor alongside plain text, so
pasting into rich-text targets keeps headings, inline styles, lists,
blockquotes, code blocks, links, and images. The HTML is generated by
walking the custom rendering attributes and emitting semantic tags with
inline CSS derived from the style config.

The system attributed-string HTML exporter was deliberately not used:
it drops image URLs, loses list markers and block chrome (drawn by
decoration views, absent from the text), and emits unstable CSS.

The pasteboard is injectable on MarkdownTextView because headless test
processes are not authorized to access UIPasteboard.general.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@maksg
maksg force-pushed the ios-parity/09-copy-html branch from f268da2 to 60c5e1c Compare August 13, 2026 11:10
@maksg
maksg merged commit 74cf0a0 into main Aug 13, 2026
9 checks passed
@maksg
maksg deleted the ios-parity/09-copy-html branch August 13, 2026 11:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants