Actually the docs are wrong. I found that I do not need to disable HTML filtering. Here's what I did:
- Under Site Setup > HTML Filtering, move
script
from Nasty tags to Valid tags, and save.
No steps from https://docs.plone.org/develop/plone/forms/wysiwyg.html#disabling-html-filtering-and-safe-html-transformation are necessary.
This is closer to being correct, but still not quite right:
https://docs.plone.org/adapt-and-extend/config/html-filtering.html#enabling-html-embed-codes