When the selection was in a link, the alignment buttons didn't work. That is because they are supposed to align the parent paragraph, which is temporarily in a contenteditable=false context when the selection is in a link. This restores the context before applying an editor command, and restores it afterwards. task-3083748 X-original-commit: 0a4eb266b198e5e02a3325d063d07c0dd8af0148 Part-of: odoo/odoo#107155