From 3668949705ad85c42e39dc18569e086d968f7022 Mon Sep 17 00:00:00 2001 From: Dan Brown Date: Fri, 22 Dec 2023 15:16:06 +0000 Subject: [PATCH] Input WYSIWYG: Fixed up some dark mode elements --- resources/js/wysiwyg/config.js | 6 ++---- resources/sass/_forms.scss | 1 + resources/views/books/parts/form.blade.php | 2 +- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/resources/js/wysiwyg/config.js b/resources/js/wysiwyg/config.js index f669849ad..963e2970d 100644 --- a/resources/js/wysiwyg/config.js +++ b/resources/js/wysiwyg/config.js @@ -331,15 +331,13 @@ export function buildForInput(options) { contextmenu: false, toolbar: 'bold italic link bullist numlist', content_style: getContentStyle(options), - color_map: colorMap, file_picker_types: 'file', file_picker_callback: filePickerCallback, init_instance_callback(editor) { const head = editor.getDoc().querySelector('head'); head.innerHTML += fetchCustomHeadContent(); - }, - setup(editor) { - // + + editor.contentDocument.documentElement.classList.toggle('dark-mode', options.darkMode); }, }; } diff --git a/resources/sass/_forms.scss b/resources/sass/_forms.scss index b63f9cdd5..8c277c2b5 100644 --- a/resources/sass/_forms.scss +++ b/resources/sass/_forms.scss @@ -408,6 +408,7 @@ input[type=color] { .description-input > .tox-tinymce { border: 1px solid #DDD !important; + @include lightDark(border-color, #DDD !important, #000 !important); border-radius: 3px; .tox-toolbar__primary { justify-content: end; diff --git a/resources/views/books/parts/form.blade.php b/resources/views/books/parts/form.blade.php index a3d4be5e9..fa8f16e52 100644 --- a/resources/views/books/parts/form.blade.php +++ b/resources/views/books/parts/form.blade.php @@ -39,7 +39,7 @@
-