Formatted content renders under a strict CSP Fixed
Under style-src 'self' without 'unsafe-inline', browsers refuse style attributesin content. The attribute stays in the document and in the HTML you save, but it is never applied — so centred text, coloured text and larger text all looked plain while editing. The editor now detects that once per editing document and re-applies each refused attribute through the CSSOM, which CSP does not govern.
Measured on the protected build under style-src 'self': content loaded with inline styles, an alignment command, the editor’s own paste handler, and undo followed by redo all render their formatting. The same test fails on 2.9.0.
- No change without a policy. If the browser applies style attributes normally, nothing is observed and your markup is left exactly as it was.
- Under a policy the attribute text is normalisedwhen it is re-applied — a hex colour is written back as
rgb(). That is the only change to saved HTML, and only on pages whose formatting did not render at all before. - The browser still logs a refusal when it first meets each attribute; this fixes what you see, not the console count.
Pasting paragraphs no longer breaks the paragraph you paste into Fixed
Pasting a paragraph, list or table while the caret sat inside a paragraph put a <p> inside the <p>. That is invalid HTML, and it was split on the way out: the text after the caret became loose text outside any paragraph and lost the paragraph’s formatting, and empty paragraphs appeared in what you saved.
The paragraph is now split at the caret and the pasted blocks go between the halves. The second half keeps the paragraph’s style but not its id, so ids are never duplicated. Pasting inline content is unchanged.
Also in this release
rubyannotation.jsandstateinspector.jsnow keep their styling under a strict CSP, closing the known gap listed for 2.9.0.- On an unlicensed install the editor no longer runs a one-second timer for the lifetime of the page, and no longer prints an empty console warning on the Community branch.