What happens when you DON'T install the SummerNote Editor?
Posted: Wed Nov 27, 2024 11:25 am
Recently, I installed a second website with WonderCMS. This time I did not move to install the SummerNote Editor. When I went to edit a page, I noticed that everything was in HTML. Could I just do everything in HTML/JavaScript without any new limitations?
Apparently, no SummerNote editor means I can pretty much do anything I want within the HTML/JavaScript frameworks. If you want a horizontal bar, then just type <hr>. Done. I couldn't do that before.
I've been wanting to install a search input form in order to make the website easily searchable. I asked Grok to generate the HTML/JavaScript code for a search form. It looks like this:
<!-- ------------------------------------------- -->
<form id="searchForm" action="javascript:void(0);">
<label for="searchQuery">Enter Search Query:</label>
<input type="text" id="searchQuery" name="q" placeholder="e.g., ProtonMail" required="">
<button type="submit">Search</button>
</form>
<script>
document.getElementById('searchForm').addEventListener('submit', function(e) {
e.preventDefault();
var q1 = document.getElementById('searchQuery').value;
var q2 = " site:mybooks2.com";
if (q1) {
var searchUrl = "https://www.google.com/search?q=" + encodeURIComponent(q1) + encodeURIComponent(q2) ;
window.open(searchUrl, '_blank');
}
});
</script>
<!-- ------------------------------------------- -->
And it works!
Google let's you do custom searches like this: search terms site:mywebsite.com. In my search code, I have this: var q2 = " site:mybooks2.com";. You just change mybooks2.com to your website. As long as Google has indexed your website then search is available.
For regular input I use the markdown editor:
Free Markdown to HTML Converter
https://markdowntohtml.com/
Markdown is much easier to use than HTML.
I have two websites. One with the Default theme and one with the Sky. The themes are kind of clunky but I like their vibe. Just something simple and fast. For me, clunky looking is good.
Apparently, no SummerNote editor means I can pretty much do anything I want within the HTML/JavaScript frameworks. If you want a horizontal bar, then just type <hr>. Done. I couldn't do that before.
I've been wanting to install a search input form in order to make the website easily searchable. I asked Grok to generate the HTML/JavaScript code for a search form. It looks like this:
<!-- ------------------------------------------- -->
<form id="searchForm" action="javascript:void(0);">
<label for="searchQuery">Enter Search Query:</label>
<input type="text" id="searchQuery" name="q" placeholder="e.g., ProtonMail" required="">
<button type="submit">Search</button>
</form>
<script>
document.getElementById('searchForm').addEventListener('submit', function(e) {
e.preventDefault();
var q1 = document.getElementById('searchQuery').value;
var q2 = " site:mybooks2.com";
if (q1) {
var searchUrl = "https://www.google.com/search?q=" + encodeURIComponent(q1) + encodeURIComponent(q2) ;
window.open(searchUrl, '_blank');
}
});
</script>
<!-- ------------------------------------------- -->
And it works!
Google let's you do custom searches like this: search terms site:mywebsite.com. In my search code, I have this: var q2 = " site:mybooks2.com";. You just change mybooks2.com to your website. As long as Google has indexed your website then search is available.
For regular input I use the markdown editor:
Free Markdown to HTML Converter
https://markdowntohtml.com/
Markdown is much easier to use than HTML.
I have two websites. One with the Default theme and one with the Sky. The themes are kind of clunky but I like their vibe. Just something simple and fast. For me, clunky looking is good.