0
0
Fork 0
mirror of https://github.com/BookStackApp/BookStack.git synced 2025-05-17 22:02:05 +00:00

Rolled dark mode out to the editors

- Updated editor, and other area, styles to look okay in dark mode.
- Used tinyMCE theme generator to create dark mode theme.
- Updated tinymce to latest 4x version.
This commit is contained in:
Dan Brown 2020-04-11 15:48:08 +01:00
parent 067cb9c5b7
commit b0b28e7b5e
No known key found for this signature in database
GPG key ID: 46D9F943C24A2EF9
50 changed files with 5286 additions and 69 deletions
resources/js/components

View file

@ -127,7 +127,13 @@ class MarkdownEditor {
loadStylesIntoDisplay() {
if (this.displayStylesLoaded) return;
this.displayDoc.documentElement.className = 'markdown-editor-display';
this.displayDoc.documentElement.classList.add('markdown-editor-display');
// Set display to be dark mode if parent is
if (document.documentElement.classList.contains('dark-mode')) {
this.displayDoc.documentElement.style.backgroundColor = '#222';
this.displayDoc.documentElement.classList.add('dark-mode');
}
this.displayDoc.head.innerHTML = '';
const styles = document.head.querySelectorAll('style,link[rel=stylesheet]');