Skip to content

FIX: Ignore styles the browser inlines on copied rich content - #108

Open
renato wants to merge 2 commits into
mainfrom
restrict-pasted-styles
Open

FIX: Ignore styles the browser inlines on copied rich content#108
renato wants to merge 2 commits into
mainfrom
restrict-pasted-styles

Conversation

@renato

@renato renato commented Aug 17, 2026

Copy link
Copy Markdown
Contributor

Previously, the mark rules matched color, background-color, and font-* style properties on any pasted element, so the computed styles browsers inline onto copied rendered content (a mention's tint, a code span's colors) came back as authored [color]/[bgcolor] tags — both in the rich editor and, through toMarkdown(), on the classic composer's enable_rich_text_paste path.

This change only claims a bare <span> holding exactly the single style declaration the cook itself writes, so cooked bbcode still round-trips while browser-inlined styling is ignored.

@renato
renato force-pushed the restrict-pasted-styles branch from 476457e to ce81e04 Compare August 17, 2026 17:58
@renato renato changed the title FIX: Don't turn incidental pasted styles into bbcode FIX: Ignore styles the browser inlines on copied rich content Aug 17, 2026
@renato
renato force-pushed the restrict-pasted-styles branch from ce81e04 to 9a6d6f5 Compare August 17, 2026 18:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants