docs/solutions/logic-errors/2026-04-04-decorated-clipboard-and-selected-text-helpers-should-strip-render-only-wrappers-and-feff.md
After decorated-text and mark-placeholder browser proofs landed, two browser semantics still needed to be made honest:
Two changes closed the gap:
slate-react-v2 Editable now owns the browser clipboard bridge through
ClipboardBridge.setFragmentData(...) and ClipboardBridge.insertData(...)slate-browser get.selectedText() now strips FEFF from the DOM selection
string before returning itThat made the browser proofs line up with actual editor semantics:
application/x-slate-v2-fragment payload plus
clean HTML/plain text"a\uFEFF"Decorations and mark placeholders are renderer details.
They can and should affect what the user sees, but they are not the fragment semantics the editor should transport through copy/paste, and they are not real user text.
If the helper returns wrapper DOM or FEFF sentinel text, the helper is lying about editor semantics.
For Slate browser helpers around rich text:
If a copy payload contains decoration-only attrs or a selected-text read contains FEFF, the browser layer is leaking implementation detail instead of editor truth.