mirror of
https://github.com/tabler/tabler.git
synced 2025-12-26 19:26:10 +04:00
Toggle TinyMCE dark mode and skin based on the set tabler theme (#1241)
This commit is contained in:
@@ -8,7 +8,7 @@
|
||||
<script>
|
||||
// @formatter:off
|
||||
document.addEventListener("DOMContentLoaded", function () {
|
||||
tinyMCE.init({
|
||||
let options = {
|
||||
selector: '#tinymce-{{ id }}',
|
||||
height: 300,
|
||||
menubar: false,
|
||||
@@ -23,7 +23,14 @@
|
||||
'alignright alignjustify | bullist numlist outdent indent | ' +
|
||||
'removeformat',
|
||||
content_style: 'body { font-family: -apple-system, BlinkMacSystemFont, San Francisco, Segoe UI, Roboto, Helvetica Neue, sans-serif; font-size: 14px; -webkit-font-smoothing: antialiased; }'
|
||||
});
|
||||
}
|
||||
|
||||
if (localStorage.getItem("tablerTheme") === 'dark') {
|
||||
options.skin = 'oxide-dark';
|
||||
options.content_css = 'dark';
|
||||
}
|
||||
|
||||
tinyMCE.init(options);
|
||||
})
|
||||
// @formatter:on
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user