Hey everybody I want to let you know that I have undertaken the grueling task of getting the heck away from WordPress. I was so sick of the problems and updates I had to do all the time. I am now using my ezbloo system and I am integrating all my old posts into the new system. It sucks, but in the end, I will save bundles of time. I needed to keep things simple and that is why I created ezbloo. I'll have more on this later for you guys after I am done with the total integration of my old posts here. So if you are looking for a post and need it faster, shoot me an email and I will make it a priority. [email protected]

Summernote is a popular WYSIWYG editor for web applications, and it supports a dark mode theme out of the box. Here are the steps to put Summernote in dark mode:

  1. Download the Summernote CSS file from the official website or use the following link: https://cdnjs.cloudflare.com/ajax/libs/summernote/0.8.18/summernote-bs4-dark.css
  2. Include the CSS file in your HTML code. You can do this by adding the following line to the head section of your HTML document:
<link href="https://cdnjs.cloudflare.com/ajax/libs/summernote/0.8.18/summernote-bs4-dark.css" rel="stylesheet">
  1. Initialize Summernote with the "bs4-dark" theme by adding the "theme" option to the initialization code. Here's an example:
$(document).ready(function() {
  $('#summernote').summernote({
    height: 300,
    theme: 'bs4-dark'
  });
});
  1. Save your HTML file and reload the page. Summernote should now be displayed in dark mode.
Note that Summernote also provides other themes, such as "default" and "bs4", which you can use by changing the "theme" option in the initialization code.

More Information on Summernote on Dark Mode

  1. Customizing the dark mode theme: If you want to customize the dark mode theme of Summernote, you can download the source code of the CSS file from the official website and modify it according to your needs. You can change the colors, font sizes, and other styles to create a theme that suits your website's design.
  2. Supporting dark mode in different browsers: Summernote's dark mode theme works in most modern browsers, including Chrome, Firefox, Safari, and Edge. However, some older browsers may not support the CSS features used in the theme, which could result in unexpected visual results.
  3. Using Summernote in a responsive design: If your website is designed to be responsive, you may need to adjust the height of the Summernote editor to ensure it fits well on different screen sizes. You can do this by setting the "height" option in the initialization code to a percentage value, such as "100%", which will make the editor take up the full height of its container.
  4. Debugging issues with dark mode: If you encounter any issues with Summernote's dark mode, such as text or icons being hard to read, you can use your browser's developer tools to inspect the CSS styles being applied to the editor. This can help you identify any conflicts or issues with your website's CSS that may be affecting the dark mode theme.

How Do I use Other Themes in Summernote?

Summernote supports different themes that you can use to customize the look and feel of the editor. Here are the steps to use other themes in Summernote:
  1. Download the CSS file of the theme you want to use. You can find a list of available themes on the Summernote website, or you can create your own custom theme using the official documentation.
  2. Include the CSS file in your HTML code by adding the following line to the head section of your HTML document:
 
<link href="path/to/summernote-theme.css" rel="stylesheet">
Replace "path/to/summernote-theme.css" with the path to the CSS file you downloaded.
  1. Initialize Summernote with the desired theme by adding the "theme" option to the initialization code. Here's an example:
$(document).ready(function() {
  $('#summernote').summernote({
    height: 300,
    theme: 'my-custom-theme'
  });
});
Replace "my-custom-theme" with the name of the theme you want to use.
  1. Save your HTML file and reload the page. Summernote should now be displayed with the new theme.
Note that Summernote provides several built-in themes, including "default", "bs4", and "bs4-dark". You can also create your own custom themes by modifying the CSS file provided by Summernote or by creating a new CSS file from scratch using the official documentation as a guide. Also, keep in mind that some themes may require additional CSS or JavaScript files to work properly. Make sure to read the documentation and follow the instructions provided by the theme's author to ensure a smooth integration with Summernote.

Preview Summernote Themes

Here is a link where you can go to preview summernote themes. There are also add on themes at GitHub located here. [embedpress]https://youtu.be/MT1YX4mn9L0[/embedpress] For codes and scripts to copy and past that I did in the video, go to the next page.

Download Scripts from Git Hub for summernote

the first thing that you want to do is download the scripts for Summernote Themes  from Github here. This will give you all the themes that I used in the video tutorial. Next if you have been following along in the tutorials here for summernote, all you have to do is modify the index.php file. Here is the new codes for that.

Index File

<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>Summernote Themes</title>
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css">
  <!-- theme files !-->
  <link href="themes/darkly/summernote-lite-darkly.min.css" rel="stylesheet">
  <link href="themes/darkly/summernote-lite-darkly-libre.min.css" rel="stylesheet">
  <!-- end theme files !-->
  <script src="https://code.jquery.com/jquery-3.2.1.slim.min.js" integrity="sha384-KJ3o2DKtIkvYIK3UENzmM7KCkRr/rE9/Qpg6aAZGJwFDMVNA/GpGFF93hXpG5KkN" crossorigin="anonymous"></script>
  <script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.12.9/umd/popper.min.js" integrity="sha384-ApNbgh9B+Y1QKtv3Rn7W3mgPxhU9K/ScQsAP7hUibX39j7fakFPskvXusvfa0b4Q" crossorigin="anonymous"></script>
  <script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/js/bootstrap.min.js" integrity="sha384-JZR6Spejh4U02d8jOt6vLEHfe/JQGiRRSQQxSfFWpi1MquVdAyjUar5+76PVCmYl" crossorigin="anonymous"></script>
  <link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/summernote.css" rel="stylesheet">
  <script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/summernote.min.js"></script>
  <style>
body{
  background: #666666;
  color:#ffffff;
}
  .note-editor.note-frame .note-editing-area .note-editable{
    background-color:#666666;
    }
  .note-editing-area *{
    color:#ffffff;
    }</style>
</head>
<body>
<h1>Summernote Themes</h1>
<form method="post">
  <textarea id="editor" name="editordata"></textarea>
  <button id="save-btn">Save</button>
</form>
<div id="display"></div>;
<script>
$(document).ready(function(){
  $('#editor').summernote({
    height: 200
  });
$("#save-btn").click(function(){
var editor = $("#editor").val();
var dataString = 'editor1='+ editor;
if(editor=='')
{
$("#display").html("Please Enter Some Content");
}
else
{
$.ajax({
type: "POST",
url: "save.php",
data: dataString,
cache: false,
success: function(result){
$("#display").html(result);
}
});
}
return false;
});
});
</script>
</body>
</html>