Adding style tag to wikipage
It is possible to include style tags in a wikipage, but only if you upload them via the API. The tinymce editor will strip them out if you edit the uploaded page or if you write them into a page manually.
Looking at the source code, the filtering was done by sanitize_field :body, CanvasSanitize::SANITIZE
in https://github.com/instructure/canvas-lms/blob/master/app/models/wiki_page.rb
Links to an external site. by the sanitize code in https://github.com/instructure/canvas-lms/blob/master/gems/canvas_sanitize/lib/canvas_sanitize/canvas_sanitize.rb
Links to an external site.
Interestingly, the actual set of tags and attributes allowed seems to be more liberal than those enumerated at https://community.canvaslms.com/t5/Canvas-Resource-Documents/Canvas-HTML-Editor-Allowlist/ta-p/387066 Links to an external site. - the sanitize code comment notes there are differences between the "tinymce and canvas_sanitize whitelists" - hence the difference between what can be injected via the API and what can be entered with the editor.