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:
parent
067cb9c5b7
commit
b0b28e7b5e
50 changed files with 5286 additions and 69 deletions
resources/js/components
|
@ -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]');
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue