Fix light / dark mode toggle in WYSIWYG editor

pull/443/head
Matt Baer 4 years ago
parent d7c9f56b40
commit 6f665e7e4b
  1. 2
      templates/wysiwyg.tmpl

@ -82,7 +82,7 @@
btns[i].src = btns[i].src.replace('_dark@2x.png', '@2x.png'); btns[i].src = btns[i].src.replace('_dark@2x.png', '@2x.png');
} }
} else { } else {
TextnewTheme = 'light'; newTheme = 'light';
document.body.className = document.body.className.replace(/(?:^|\s)dark(?!\S)/g, newTheme); document.body.className = document.body.className.replace(/(?:^|\s)dark(?!\S)/g, newTheme);
for (var i=0; i<btns.length; i++) { for (var i=0; i<btns.length; i++) {
btns[i].src = btns[i].src.replace('@2x.png', '_dark@2x.png'); btns[i].src = btns[i].src.replace('@2x.png', '_dark@2x.png');

Loading…
Cancel
Save