-
Improvement
-
Resolution: Unresolved
-
Minor
-
None
-
4.2
-
MOODLE_402_STABLE
-
10
Something we've discussed internally is adding support for a series of colour plugins.
At the moment the standard TinyMCE colour plugins are not suitable as they set a hex colour code as a style attribute on the content. This is 'okay' initially, but if there are any theme changes then these can become problematic.
What we propose doing instead is to draft a contract with themes that essentially states that a series of complementary colours will be made available using CSS variables that the editor can then consume.
These will essentially mean that we can configure colours in the editor, but if a theme implements (for example) dark mode then the colours will change such that they are still an appropriate contrast. Likewise if the background colour of the theme were to change in a future iteration, the colours would be updated to remain high enough contrast for AA compliance.